Where to send emails with questions about WebAssembly?

Okay, so where should I send questions for WebAssembly? Is it this mailing list or a different one? I want to ask about how to compile WebAssembly modules with Clang directly, without Emscripten, for situations like what I have currently where I have a problem with generating WebAssembly and/or JavaScript glue code (I have a problem with the gen_struct_info stuff; I asked on the Emscripten GitHub about it and it seems like it’s really hard to debug the issue).

Hi Osman,

If you have a problem using emscripten you should ask on the emscripten-discuss mailing list. Doing that can also get you related LLVM help since there is considerable overlap between the people maintaining emscripten and the WebAssembly LLVM backend. emscripten-discuss is also probably the best list for asking about using clang/lld to compile WebAssembly modules, since those questions are not really about the development of LLVM itself. Questions about WebAssembly-specific features or potential bugs in LLVM or lld can certainly be asked here, though.

That being said, if you are trying to compile C/C++ for the web, it will be much more difficult to do that without emscripten than with emscripten. Emscripten does a lot of work to provide necessary runtime support for C/C++ on the web in addition to all of its POSIX emulation support. Without emscripten, you will have to reinvent those wheels from scratch.

Thomas

Hi Osman,

Emscripten is the commonly-used toolchain to generate WASM code for web pages (as opposed to server-side), though there are other (potentially less established) solutions. You can try Clang+LLD if your code does not use system libraries, otherwise you need some form of WebAssembly sysroot. There is wasi-sysroot [1], but I haven’t personally tried it yet. This approach (avoiding Emscripten) can work, but depending on how you are going to use the generated code your mileage might vary. At any rate I’d be curious to hear what you are trying to compile, if you can share that.

Note that mainstream LLVM does not have the JavaScript backend, therefore Emscripten is the probably the best way to go if you want to generate JavaScript code. As mentioned above, there is no settled libc for WASM (though Emscripten and WASI both have their implementations and you might be able to import WASI’s). Lastly, direct use of clang would require passing a few liker options to disable generating entry point code and manage symbols your export to and import from JavaScript.

If you have questions about WebAssembly in LLVM this shoud be the right place to ask (and cfe-dev is for Clang questions). Questions about WASI or Emscripten components should probably be directed to appropriate developer communities.

Best,

Petr

[1]: