Re:Show HN: How to compile C/C++ for WASM, pure Clang, no li...
by hobo_mark on Monday April 11, 2022 @02:12PM
(#30992562)
Excellent, I wonder if using a two year old LLVM fork is still required, wasm support should be in trunk by now.
[ Parent
| on HN ]
Re:Show HN: How to compile C/C++ for WASM, pure Clang, no li...
by syrusakbary on Monday April 11, 2022 @02:48PM
(#30992986)
Running Clang with WASI requires compiling LLVM to WASI first, which unfortunately currently requires a fork (because of the "hackyness" of it, as some syscalls are mocked or certain code is just skipped).
This talk from Ben Smith goes into a bit more depth on what was required to change on LLVM to compile to WASI: https://www.youtube.com/watch?v=5N4b-rU-OAA