crate-ci / escargot

Cargo API written in Paris
docs.rs/cargo
Apache License 2.0
42 stars 14 forks source link

Support drop-in replacements for cargo #12

Closed epage closed 6 years ago

epage commented 6 years ago

Like xargo, see https://github.com/roblabla/cargo-travis/issues/34#issuecomment-420010176

epage commented 6 years ago

Options

roblabla commented 6 years ago

cargo_metadata uses the CARGO environment variable. https://github.com/oli-obk/cargo_metadata/blob/master/src/lib.rs#L302

roblabla commented 6 years ago

Note that while this works fine for overriding cargo in the cargo metadata case (it allows setting the path to the cargo binary), it's not such a great solution for cases where you want to override cargo build so it instead runs cargo xbuild for instance. I'm not sure how to best handle this.

epage commented 6 years ago

it's not such a great solution for cases where you want to override cargo build so it instead runs cargo xbuild for instance. I'm not sure how to best handle this.

I guess that could be a special environment variable for escargot? The only other option is a custom cargo wrapper that maps build to xbuild.