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

Why is there .cargo/config.toml file? #129

Closed
dsabala opened this issue Oct 30, 2024 · 0 comments
Closed

Why is there .cargo/config.toml file? #129

dsabala opened this issue Oct 30, 2024 · 0 comments

Comments

@dsabala
Copy link

dsabala commented Oct 30, 2024

Hi

Coming from C language, CMake build-system and PyInvoke project CLI support I am really impressed by how Rust treats build-system issues. However I cant understand why we use .cargo/config.toml files so extensively in the first place?

According to the Cargo documentation, the .cargo/config.toml file is a kind of hierarchical Cargo configuration. How can we define e.g. the target target.thumbv7m-none-eabi in such a file?

Why cant we move all content from .cargo/config.toml to manifest file Cargo.toml ?

Edit:

I guess this choice is made to keep Cargo.toml file more platform-generic?
I think that it could be explained inside this .cargo/config.toml file

Edit 2:

Rust and Cargo are still evolving, it looks like .cargo/config.toml file was there before introduction of Cargo.toml file and now there are ongoing works to move some configuration to Cargo.toml file

rust-lang/cargo#12738

@dsabala dsabala closed this as completed Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant