-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Simplify the example a bit #105
Conversation
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.
This is great, thank you! I think the prelude used to be needed for wasm_bindgen(start)
.
bors r+
105: Simplify the example a bit r=grovesNL a=17cupsofcoffee Here's a few tweaks that make the example a bit simpler/up-to-date: * A seperate `wasm_main` is no longer required due to rustwasm/wasm-bindgen#1843. * The prelude import wasn't actually being used anywhere. * Nightly is no longer required to build this project, so I removed that from the instructions. * `--no-modules` has been replaced with `--target web`, which doesn't rely on global variables and allows support for [JS snippets](https://rustwasm.github.io/docs/wasm-bindgen/reference/js-snippets.html). * The only caveat to this is that the generates JS is a ES module instead of a basic JS file - but any browser that supports WASM will also support ES modules, so I don't think this is an issue in practice. Co-authored-by: Joe Clay <[email protected]>
Ah yeah, that makes sense! |
Build failed:
|
The CI failure is unrelated, |
It looks like Rust 1.38.0 stabilizes |
Done! |
Apparently |
Done (looks like xml-rs added the doc tests in a patch release about a month ago, and that's used by gl_generator) - third time's the charm, hopefully... |
bors r+ |
Build succeeded:
|
Here's a few tweaks that make the example a bit simpler/up-to-date:
wasm_main
is no longer required due to Add first-class support for binary crates rustwasm/wasm-bindgen#1843.--no-modules
has been replaced with--target web
, which doesn't rely on global variables and allows support for JS snippets.