Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] allow passing arguments to cargo build #3398

Closed
Themayu opened this issue Feb 11, 2022 · 4 comments
Closed

[feat] allow passing arguments to cargo build #3398

Themayu opened this issue Feb 11, 2022 · 4 comments

Comments

@Themayu
Copy link

Themayu commented Feb 11, 2022

Describe the problem

I am trying to debug an issue with my project setup that causes tauri's cargo build invocation to fully rebuild the entire project, plus dependencies after rust-analyzer has finished checking the project source. According to comments on rust-lang/cargo#4961 I need the output of invoking cargo build with the flag -vvvv to do this, but the problem only appears when cargo is invoked through tauri dev and doesn't show up on a manual cargo build invocation.

Describe the solution you'd like

I would like a way to pass arguments directly to the underlying cargo build calls performed by tauri build and tauri dev. This would allow me to pass the flag -vvvv directly and get fully verbose output from the build process.

Alternatives considered

An alternative solution would be a separate flag under tauri build/tauri dev to directly set the verbosity level that will be requested from the build process, but if more flags are required in the future then supporting each one separately can be harder to maintain than simply allowing users to pass them directly to the toolchain.

Additional context

I have asked on the Tauri Discord server about existing ways to get this output, and have been told that it is currently not yet possible to pass the flag I require. I have been asked to open this feature request, as it sounds like a useful feature to have. According to rust-lang/cargo#4961 directly passing the verbose flag to cargo build is needed to get the information, and therefore an alternative solution cannot be found.

@amrbashir
Copy link
Member

amrbashir commented Feb 11, 2022

for now you can enable verbosity or any other cargo option using the cargo configuration file https://doc.rust-lang.org/cargo/reference/config.html#termverbose

@Themayu
Copy link
Author

Themayu commented Feb 11, 2022

for now you can enable verbosity or any other cargo option using the cargo configuration file https://doc.rust-lang.org/cargo/reference/config.html#term

Unfortunately setting this in .cargo/config.toml appears to have no effect at all on cargo's output, even when I manually run cargo build.

@samw3
Copy link

samw3 commented Apr 16, 2024

Can someone give an example of how this is used?

@FabianLars
Copy link
Member

@samw3

pnpm tauri build -- --ignore-rust-version
npm tauri build -- -- --ignore-rust-version // npm needs an extra --

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants