I'm following this tutorial to re-learn #WebAssembly programming in #Rust using the latest coolness of wasm-bindgen, wasm-pack, and... NO emscripten! 😎
https://rustwasm.github.io/book/game-of-life/hello-world.html
I'm following this tutorial to re-learn #WebAssembly programming in #Rust using the latest coolness of wasm-bindgen, wasm-pack, and... NO emscripten! 😎
https://rustwasm.github.io/book/game-of-life/hello-world.html
Of course, my brand new hello world app starts off with 8 high severity vulnerabilities 😂
After an `npm audit fix --force`, I'm left with only 6 high vulns 👍
...and it broke my development setup. I can't test my #rust "hello world" any more 😟
Is #npm really so bad, or I'm having bad luck?
After manually updating all the devDependencies in package.json. the webpack-dev-server starts again, but now it's refusing to load my #wasm code due to a BREAKING CHANGE.
Is npm a new type of DLL hell?? Luckily, there are clear instructions to solve the problem...
All right, my hello-wasm works!
Time spent writing WebAssembly code in Rust: 1 min
Time spent fighting npm: 1 hour
@codewiz WELCOME TO THE HELLO WORLD RANSOMWARE!!! 😂
@neglesaks Oh yeah,
42 packages are looking for funding
run `npm fund` for details
...or else someone might slip a dozen high vulnerabilities and BREAKING CHANGEs in deps you didn't even know existed...
@akhil Yeah, I switched to wasm-pack a couple of days ago.
For local http serving I've been using this thing, but it's very limited (no way to customize the html):
https://github.com/rukai/cargo-run-wasm
I see that trunk has a built-in dev server, I'll give it a try when I find some time.
Thanks for the tips!
@codewiz
You may like https://crates.io/crates/wasm-pack and/or https://crates.io/crates/trunk to build wasm apps without node and npm.
@akhil Also found this alternative which seems useful:
https://github.com/rustminded/xtask-wasm
Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.