3 ms·
>It is almost 1:1 in that you can compile WAT to Wasm and then back to WAT with barely any loss in information (you may lose variable names and some metadata).
by psychoslave 10mo ago
>It is almost 1:1 in that you can compile WAT to Wasm and then back to WAT with barely any loss in information (you may lose variable names and some metadata).
I love it! It reads like, "you can put your snowman in a oven to obtain water and then the water to a snow machine to get to your initial material state with almost no information lost."
- everfrustrated 10mo agoI was reading a research paper who benchmarked some wasm compilers and the fastest was converting wasm back to c and recompiling it again!
- vitalnodo 10mo agoCan you recall the link?
- everfrustrated 10mo agosee w2c2 in this paper https://www.opencloudification.com/wp-content/uploads/2025/07/comparative_study_WA_runtimes.pdf https://www.opencloudification.com/wp-content/uploads/2025/0... Tho I have mis-remembered it. They transpile wasm back to C and compile that to a native binary.
- yencabulator 10mo agow2c2 has only 2 mentions. wasm2c is not a clear winner, it's specifically losing several of their benchmarks. In general, using a preexisting compiler as a JIT backend is an old hack, there's nothing new there. It's just another JIT/AoT backend. For example, databases have done query compilation for probably decades by now.