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

Switch cargo build working directory to the Manifest (cargo.toml) directory #205

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

jschwe
Copy link
Collaborator

@jschwe jschwe commented Aug 28, 2022

The output directory (target-dir) is left unchanged.
Changing the cwd to the directory of the Manifest, has the advantage that
cargo can pick up .cargo/config.toml files in the source tree.
In the future this would also allow corrosion to respect rust-toolchain.toml
and other rustup toolchain overrides.

Closes #150

@jschwe jschwe requested a review from ogoffart August 29, 2022 05:50
@ogoffart
Copy link
Collaborator

The CI is failing though (when Corrosion is used as a library)

The output directory (target-dir) is left unchanged.
Changing the cwd to the directory of the Manifest, has the advantage that
cargo can pick up `.cargo/config.toml` files in the source tree.
In the future this would also allow corrosion to respect `rust-toolchain.toml`
and other rustup toolchain overrides.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
@jschwe
Copy link
Collaborator Author

jschwe commented Aug 29, 2022

The CI is failing though (when Corrosion is used as a library)

Fixed. The test requires Cargo >= 1.56, since that is when support for the env key was added. I had a look at the other available keys in 1.46.0, but nothing really stood out in terms of being suitable for a simple test if the config.toml was read.

@jschwe jschwe merged commit 5553297 into corrosion-rs:master Aug 30, 2022
@jschwe jschwe deleted the src-config-toml branch August 30, 2022 06:04
@jschwe jschwe added this to the v0.3 milestone Sep 18, 2022
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

Successfully merging this pull request may close these issues.

usage of .cargo/config
2 participants