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

feature request: automatically target the lib #45

Closed
ashleygwilliams opened this issue Mar 1, 2018 · 4 comments
Closed

feature request: automatically target the lib #45

ashleygwilliams opened this issue Mar 1, 2018 · 4 comments

Comments

@ashleygwilliams
Copy link
Member

the final step for running wasm-bindgen is:

wasm-bindgen target/wasm32-unknown-unknown/release/<name of lib>.wasm \ --out-dir .

it would be easier to use this tool to automate if it automagically knew to look in that directory for a wasm file named with the same name as the crate.

i'm sure i don't know all the details but would that be possible?

@alexcrichton
Copy link
Contributor

To make sure I understand, you're thinking that it'd be nice to do:

$ wasm-bindgen

which would be the equivalent of

$ wasm-bindgen target/wasm32-unknown-unknown/relesase/$inferred.wasm --out-dir .

right?

@ashleygwilliams
Copy link
Member Author

yeah! maybe with the option to still pass the --out-dir flag to configure but to default to .

@alexcrichton
Copy link
Contributor

Seems plausible to me!

@ashleygwilliams
Copy link
Member Author

i'm actually gonna close this, if the goal is that we have wasm-pack wrap this - wasm pack already knows the name of the lib and is a better place to take care of this work since it's already reading the cargo toml. see https://github.com/ashleygwilliams/wasm-pack/pull/17 for details (sorry in advance its a big one)

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

No branches or pull requests

2 participants