leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
314 stars 87 forks source link

Add --target-dir Argument for Compatibility with Cargo Commands #272

Open naftulikay opened 3 weeks ago

naftulikay commented 3 weeks ago

I'm using JetBrains RustRover, and I'm also using its remote target system to run build/serve/watch on a remote computer on my network over SSH. My laptop simply doesn't have enough RAM to run everything, and the RAM is soldered so I'd need to shell out $2-3K in order to fix this issue.

When RustRover runs a Cargo target, it automatically postfixes --target-dir=/path/to/target to the exec call, and since cargo leptos watch does not understand this argument, I can't run it remotely.

I'll also be filing a bug report with RustRover to allow it to not pass this argument, but if cargo-leptos simply parsed this argument and passed it to the underlying cargo calls, this would solve this problem entirely without a fix in RustRover. This argument may be useful in other contexts as well.