News for hackers. Stuff that matters.
Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by spiffytech on Monday December 10, 2018 @03:47PM (#18651042)
So we could hypothetically convert nginx to WASM with wasmer, then convert it back to native code with cmm_of_wasm? We've come full circle.
Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by kodablah on Monday December 10, 2018 @04:26PM (#18651291)
As an adjacent dead comment points out, you'd use Emscripten to "convert nginx to WASM" (i.e. "compile"). Wasmer is a runtime.

But there are actually use cases to what you're talking about. Essentially instead of nginx -> LLVM -> machine code you're replacing it with nginx -> WASM -> cmm_of_wasm -> machine code. There are tons of LLVM opts already, but if there weren't, it might be reasonable to use WASM as IR and using cmm_of_wasm's opts to make it faster than a naive C compiler (but of course none of the popular compilers are naive anyways). Also, of course this won't work today because cmm_of_wasm doesn't rebuild the syscalls from emscripten-compiled-WASM (yet). But if you're writing your own language today, ignoring system interaction for a sec, targeting WASM even for native might not be a bad idea as backends are coming w/ optimizations.

Re:Cmm_of_wasm: From WebAssembly to Native Code via the OCam... by comesee on Monday December 10, 2018 @04:12PM (#18651199)
You use emscripten to convert nginx c code to wasm