DioxusLabs / DioxusLabs/dioxus
Allow dioxus cli to specify workspace dir via argument instead of relying on current working directory to workaround cargo problem
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Feature Request
IDE commonly uses `cargo run` to run dioxus cli when developing dioxus cli. Currently dioxus cli seems doesn't allow specifying workspace dir in argument, so I have to change the current working directory of `cargo run` command to the project being built by dioxus cli.
However, if the workspace being built by dioxus cli use non-stable toolchain (nightly toolchain or custom toolchain), then the current working directory will have `rust-toolchain.toml`. Then `cargo run` will use custom toolchain to build dioxus cli. But nightly rust is often not stable so dioxus cli may fail to build.
Also cargo doesn't provide a way to set inner program's current working directory by argument.
Currently cargo has unstable `-C` option https://github.com/rust-lang/cargo/issues/10098 which allows cargo to not consider `.cargo/config.toml` in current working directory. But it will still use `rust-toolchain.toml` in current working directory https://github.com/rust-lang/cargo/issues/11957
To clarify, there are two current working directories:
1. The directory of dioxus project itself
2. The directory of the rust project that I want to build using dioxus cli
I want to use `cargo run` to run dioxus cli. Because the project being built by dioxus cli is in directory 2, I have to use `cargo run` to run dioxus cli in directory 2, but then `cargo run` will wrongly pick `rust-toolchain.toml` in directory 2, but I want to run dioxus cli itself in stable toolchain.
## Implement Suggestion
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.