Theseus: Translating Win32 to WASM
by ingve on 5/25/2026, 7:26:20 AM
https://neugierig.org/software/blog/2026/05/theseus-wasm.html
Comments
by: kettlecorn
I am unfamiliar with this project and only skimmed this post but if this uses Rust for the main binary blob it should be possible to have the main thread blob shared with the other threads even with the blocking.<p>The blog post cites the concern that malloc could block, however when Rust's standard library is compiled with support for atomics enabled the Rust allocator's locking implementation busy loops instead of waiting on the main thread.<p>See the comment in the Rust source here: <a href="https://github.com/rust-lang/rust/blob/77a4fb62f70c6ea05e1820216d903938e331d42b/library/std/src/sys/alloc/wasm.rs#L78" rel="nofollow">https://github.com/rust-lang/rust/blob/77a4fb62f70c6ea05e182...</a><p>This means that if care is taken to avoid any other code that makes the main thread wait it should be possible to use a single shared binary instead of the more convoluted approach presented in the blog post.
5/27/2026, 6:06:25 PM
by: hardwaresofton
If you’re poking around WASM consider falling down the Component Model rabbit hole:<p><a href="https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md" rel="nofollow">https://github.com/WebAssembly/component-model/blob/main/des...</a><p>Threading is actively being worked on right now (to be released in 0.3.x, soon), and some changes just made their way into LLVM as well:<p><a href="https://github.com/llvm/llvm-project/pull/175800" rel="nofollow">https://github.com/llvm/llvm-project/pull/175800</a>
5/27/2026, 5:31:11 PM
by: lukax
There is also Retrotick.<p><a href="https://retrotick.com/" rel="nofollow">https://retrotick.com/</a><p>It simulates x86 (win32 and win16) and implements Windows APIs in javascript and renders window frames with DOM and contents with canvas (e.g. GDI translates to browser canvas operations). A lot of programs run already but a lot of APIs are not yet implemented.<p>I successfullt spent a few days extending it to run a Click & Create based game from my childhood.
5/27/2026, 7:12:14 PM
by: modeless
Seems like Theseus is not using OffscreenCanvas yet. Should be a good fit for something that runs off the main thread. Graphics can be rendered from a background worker thread directly to the screen without the involvement of the browser main thread at all.<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCa...</a>
5/27/2026, 5:47:23 PM
by: mickael-kerjean
It's refreshing to see those kind of projects coming back on HN. Pretty awesome to see your example (<a href="https://evmar.github.io/theseus/" rel="nofollow">https://evmar.github.io/theseus/</a>) fit in about 1MB when a lot of those wasm projects can be super heavy (like libreoffice which is 50MB after brotli compression)
5/27/2026, 4:17:01 PM
by: univrsaltrans
Interesting project!<p>It's just a matter of time before we'll have a universal executable/binary translator that can run any program from any OS. These are artificial constructs when you think about it.
5/27/2026, 6:36:59 PM
by: astlouis44
Anyone think this could be used for translating native Windows games over to WASM? Would need to add WebGPU rendering to this
5/27/2026, 6:56:35 PM
by: Findecanor
When I clicked, I thought this was going to be about the Theseus <i>operating</i> <i>system</i> [0]. Running win32 programs on it would have been ... interesting.<p>It too uses WASM, but for running non-Rust programs in sandboxes. Everything else is Rust. Hmm.. Last updated in 2024 though.<p>0: <a href="https://github.com/theseus-os/Theseus" rel="nofollow">https://github.com/theseus-os/Theseus</a>
5/27/2026, 5:42:14 PM
by: Aurornis
Seeing minesweeper recompiled to run in the browser is awesome.<p>The pain points about threading in the browser and debugging wasm are the two problems I ran into on another project. I hope we can get some improvements in both areas because wasm would be a lot easier to work with if developers didn't have to fight both of those topics.
5/27/2026, 4:42:03 PM
by: valorzard
I also tried doing multithreaded wasm in Rust, and I got some weiiiiird errors. Definitely not stable yet.
5/27/2026, 4:27:05 PM
by: arka2147483647
I miss the days when this would just have been named win2wasm.<p>These branded projects become difficult to remember when everything has a random non-mnemonic name.
5/27/2026, 5:32:55 PM
by: theanonymousone
This is a big deal when/if it's working, to me at least. Where can I contribute?
5/27/2026, 4:49:15 PM
by: gigel82
An interesting learning project, but not actually usable.<p><a href="https://github.com/danoon2/Boxedwine" rel="nofollow">https://github.com/danoon2/Boxedwine</a> looks interesting in this space, but unfortunately it can't really run anything remotely modern in practice (though if you're looking at 20th century Windows software it will likely be capable of running it).
5/27/2026, 5:12:48 PM