-
Notifications
You must be signed in to change notification settings - Fork 409
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
add an option to pass an arbitrary set of arguments to cargo build #461
Conversation
@torkve thanks so much for this! would you mind adding a test? and potentially an example to the documention? thanks so much! |
I've added a test and a bit of docs, however English is not my native language, so feel free to fix it. |
Are there any news with this PR? :-) |
hey @torkve - thank you for this and sorry for the lack of and delay of reply. i'm currently a little blocked on getting 0.6.0 out. my only concern with this PR is that we may also want to pass extra unsupported arguments to wasm-bindgen and this interface poses a bit of a conflict with that. if it were gated by a flag (perhaps |
I suppose you are correct from the POV that options should be similar.
Second variant is not pretty enough. And if one would need to escape some characters, it'll become even more complicated. While currently I do not see any possible complex values in wasm-bindgen arguments, I think it would not be the best option to make it look just like May be every wasm-bindgen option just should be exposed in wasm-pack? |
Would setting env vars to pass arguments possibly be a solution? That might make it somewhat consistent with cargo, since Perhaps @alexcrichton might have ideas? I believe he contributed to passing arguments to rustc from cargo. |
I'd personally advocate for a design that:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after thinking about it- i'm inclined to agree with @alexcrichton! i think this looks great- i'll work to get it into 0.6.0
Fixes #455.
Example:
wasm-pack build -- --features "feature-a feature-b"
Make sure these boxes are checked! π¦β
rustfmt
installed and have yourcloned directory set to nightly
$ rustup override set nightly $ rustup component add rustfmt-preview --toolchain nightly
rustfmt
on the code base before submittingβ¨β¨ π Thanks so much for contributing to wasm-pack! π β¨β¨