Re:WebAssembly Threads ready to try in Chrome 70
by jake_the_third on Tuesday October 30, 2018 @12:41AM
(#18334047)
Is there documentation on Rust+WebAssembly that is presented more like a conventional book or tutorial?
I don't do well with example-driven documentation like these. Resources like the original rust book are excellent though.
Re:WebAssembly Threads ready to try in Chrome 70
by hencoappel on Tuesday October 30, 2018 @05:25AM
(#18334987)
I'm going to have to be that guy and say, did you try googling it?
Here's one guide: https://hackernoon.com/compiling-rust-to-webassembly-guide-4...
Re:WebAssembly Threads ready to try in Chrome 70
by jake_the_third on Tuesday October 30, 2018 @08:05AM
(#18335715)
I was under the impression that the wasm emscripten target was deprecated in favor of the rust-specific wasm target. Am I wrong?
Re:WebAssembly Threads ready to try in Chrome 70
by steveklabnik on Tuesday October 30, 2018 @08:40AM
(#18335932)
You're not. Well, it's not officially deprecated, but it pretty much is, yeah.
Re:WebAssembly Threads ready to try in Chrome 70
by singularity2001 on Tuesday October 30, 2018 @03:31AM
(#18334505)
Is there really that much to learn?
You can just target WebAssembly like this:
cargo +nightly build --target wasm32-unknown-unknown
Re:WebAssembly Threads ready to try in Chrome 70
by majewsky on Tuesday October 30, 2018 @05:06AM
(#18334903)
Okay, then how do I run that? How do I interface with the JS/DOM world? (Those are rhetorical questions. I just mean to show that there is, in fact, more to learn.)
Re:WebAssembly Threads ready to try in Chrome 70
by v_lisivka on Tuesday October 30, 2018 @11:32AM
(#18337554)
Try (after installing of rust and cargo via rustup):
# Install support for "wasm" command for cargo:
cargo install cargo-wasm
# Install wasm target and wasm-gc tool:
cargo wasm setup
# Create new wasm project:
cargo wasm new hello_world
and then in hello_world directory: # Build and run wasm project:
cargo wasm run
https://rustwasm.github.io/book/
Learning Rust at the same time as Rust+WebAssembly might be a bit of a reach, though.