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

migrate wasm example to trunk #844

Merged
merged 2 commits into from
Feb 25, 2024

Conversation

spookyvision
Copy link
Contributor

@spookyvision spookyvision commented Feb 23, 2024

Description

This PR migrates the wasm example from an npm/webpack based approach to trunk. Fixes #834.

Of note:
the console_error_panic_hook dependency was gated in Cargo.toml via [target."cfg(debug_assertions)".dependencies]. This is documented as nonfunctional and will throw a warning on build:

warning: Found `debug_assertions` in `target.'cfg(...)'.dependencies`. 
This value is not supported for selecting dependencies and will not work as expected. 
To learn more visit https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies

Since the actual usage of console_error_panic_hook is also gated in lib.rs behind #[cfg(debug_assertions)] it didn't make sense to have the cargo gate in place, hence I have removed it.

Next steps

If this PR is merged, the wiki page linked in the root README should be updated as well.

@est31
Copy link
Member

est31 commented Feb 24, 2024

Thanks for your PR. There is a bunch of build failures in CI, especially around wasm, could you have a look?

@spookyvision
Copy link
Contributor Author

Thanks for your PR. There is a bunch of build failures in CI, especially around wasm, could you have a look?

I'm only seeing asmjs-wasm32-test fail and there's this message in the log:

error: component 'rust-std' for target 'asmjs-unknown-emscripten' is unavailable for download for channel 'stable'

this seems entirely unrelated to my PR…

as a side note though, trunk uses wasm-bindgen, which in turn only works with thewasm32-unknown-unknown target, so asmjs-unknown-emscripten is unsupported.

@est31
Copy link
Member

est31 commented Feb 24, 2024

Hmmm yeah fair points. Let's merge this.

@est31 est31 merged commit db04f57 into RustAudio:master Feb 25, 2024
14 of 16 checks passed
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.

migrate WASM example and documentation+Wiki from webpack to trunk
2 participants