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

[rust] Add buildParams.defaultFeatures option to rust.cargoBuild() #167

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

kylewlacy
Copy link
Member

This PR updates the options for the rust.cargoBuild() function with a new buildParams.defaultFeatures option. When set to false, it adds the --no-default-features flag when building the crate.

Also, I made two tiny cleanup changes:

  • Validate the feature strings in buildParams.features with a regex (this should avoid shell quoting issues)
  • Remove extra .crates.toml / .crates2.json files from build output (see "Cargo Home" in the Cargo docs for more context)

@kylewlacy kylewlacy merged commit 2f69f81 into main Jan 17, 2025
3 checks passed
@kylewlacy kylewlacy deleted the rust-add-default-features-option branch January 17, 2025 04:51
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.

1 participant