Skip to content

Alternative to cargo per-package-target unstable feature? #729

Answered by ipetkov
kuroahna asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kuroahna! I know cargo allows configuring exactly which packages to build or exclude as part of the CLI arguments. For example I'd imagine you can do something like:

  • set cargoExtraArgs = "--exclude your-wasm-package"; for the "native" derivation
  • set cargoExtraArgs = "--target wasm32-unknown-unknown -p your-wasm-package"; for the wasm derivation

Ideally, I'd like to use cargo xtask to handle the post install phase instead of using shell scripts

Generally speaking you should be able to set installPhaseCommand (or installPhase if you want to control running pre/post hooks yourself) to any arbitrary invocation you'd like. Check out the API docs for the specifics.

Hope this helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kuroahna
Comment options

Answer selected by kuroahna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants