Skip to content

Add a --cargo-bin flag to choose the cargo binary - #1180

Open
ChrisJr404 wants to merge 1 commit into
mozilla:mainfrom
ChrisJr404:cargo-bin-flag
Open

Add a --cargo-bin flag to choose the cargo binary#1180
ChrisJr404 wants to merge 1 commit into
mozilla:mainfrom
ChrisJr404:cargo-bin-flag

Conversation

@ChrisJr404

Copy link
Copy Markdown

This adds a --cargo-bin flag so cbindgen can be pointed at a specific cargo binary for the cargo metadata and cargo expand calls, as asked for in #1049. It takes precedence over the CARGO environment variable, which still falls back to a bare cargo on PATH, so the default behavior is unchanged.

This is handy for hermetic build systems that don't allow relying on environment variables. There's also a with_cargo_bin method on the builder for the library API, alongside the existing with_lockfile.

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