News for hackers. Stuff that matters.
Re:Ask HN: Why did Nim not catch-on like wild fire as Rust did? by xigoi on Monday June 26, 2023 @05:36PM (#36486213)
The problem with WebAssembly isn't that Nim couldn't compile to it (which it can), but that WebAssembly can't do anything without JavaScript.
Re:Ask HN: Why did Nim not catch-on like wild fire as Rust did? by 0atman on Tuesday June 27, 2023 @03:20AM (#36489853)
We're not talking about hypotheticals. Rust wasm is used in production now. https://developers.cloudflare.com/workers/tutorials/hello-wo...

Emscripten and experimental backends hardly count as support for Nim. Python can run in webassembly by the same token, but no one would. The standard rust compiler compiles directly to webassembly, natively, with the stable toolchain.

In other languages, yes, the js bridge is a problem. However, not only will this be fixed in browsers at some point, but rust is so fast that TODAY yew.rs, a mature wasm framework, is faster than react.

My thoughts are better explained in this video https://youtu.be/P4LMfkFLRsI

Re:Ask HN: Why did Nim not catch-on like wild fire as Rust did? by xigoi on Tuesday June 27, 2023 @05:00AM (#36490534)
Doesn't Rust with WebAssembly require any JavaScript to run?

If not, can you show me a webpage that uses WebAssembly and doesn't contain any JavaScript?

If yes, what is the advantage over just compiling to JavaScript?

> However, not only will this be fixed in browsers at some point,

This has been promised for several years, and is still nowhere to be seen.

> yew.rs, a mature wasm framework, is faster than react.

Being faster than React is not a high bar.

Re:Ask HN: Why did Nim not catch-on like wild fire as Rust did? by 0atman on Tuesday June 27, 2023 @07:23AM (#36491388)
My apologies, it's faster than svelte, not just react: https://www.youtube.com/watch?v=4KtotxNAwME
Re:Ask HN: Why did Nim not catch-on like wild fire as Rust did? by nicklauri on Tuesday June 27, 2023 @02:24PM (#36496762)
WebAssembly is not just for the web. Please take a look at wasmtime[1], wasmer[2]. It's the future of computing.

You might want to read this iconic tweet[3]

[1]: https://wasmtime.dev [2]: https://wasmer.io [3]: https://twitter.com/solomonstre/status/1111004913222324225