News for hackers. Stuff that matters.
Re:Saying Goodbye to Asm.js by stkdump on Wednesday May 20, 2026 @09:30AM (#48207436)
There goes my plan to use js code generation at runtime to make my algorithms faster. Doing this with wasm will be much harder.
Re:Saying Goodbye to Asm.js by eqrion on Wednesday May 20, 2026 @10:35AM (#48208578)
Generating wasm code at runtime is pretty easy (I'd imagine easier than generating valid asm.js code). We have a little library for our tests that handles a lot of it: https://searchfox.org/firefox-main/source/js/src/jit-test/li...
Re:Saying Goodbye to Asm.js by flohofwoe on Wednesday May 20, 2026 @10:09AM (#48208114)
Just try the asm.js subset and see how it performs for you, I remember that even without the special asm.js support in browsers Emscripten output performance was surprisingly good
Re:Saying Goodbye to Asm.js by cogman10 on Wednesday May 20, 2026 @10:38AM (#48208630)
In fact, I think it was only firefox that made a special JIT route. Chrome moved optimizations into the regular JIT.
Re:Saying Goodbye to Asm.js by giancarlostoro on Wednesday May 20, 2026 @09:53AM (#48207825)
There's still AssemblyScript? It might meet your requirements, unless I'm misunderstanding you or the features of it.

https://www.assemblyscript.org/

Re:Saying Goodbye to Asm.js by titzer on Wednesday May 20, 2026 @10:05AM (#48208026)
It will still work. asm.js is just regular JavaScript code, after all. It just won't parse/run as fast as custom pipeline for asm.js. My guess is that you will not notice much difference unless you have a really huge application.
Re:Saying Goodbye to Asm.js by koolala on Wednesday May 20, 2026 @10:03AM (#48208002)
There are some WAT compilers that are small and fast for running in the browser.
Re:Saying Goodbye to Asm.js by nextaccountic on Wednesday May 20, 2026 @10:16PM (#48216999)
If you use a library it's not harder. In Rust you would use something like this, https://crates.io/crates/wasm-encoder

While in JS you would probably use https://www.npmjs.com/package/binaryen