[llvm-dev] Where to send emails with questions about WebAssembly?
Petr Penzin via llvm-dev
llvm-dev at lists.llvm.org
Fri May 10 21:10:46 PDT 2019
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]: https://github.com/CraneStation/wasi-sysroot
On 5/8/19 1:47 PM, Thomas Lively via llvm-dev wrote:
> 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
>
> *From: *Osman Zakir via llvm-dev <llvm-dev at lists.llvm.org
> <mailto:llvm-dev at lists.llvm.org>>
> *Date: *Wed, May 8, 2019 at 1:26 PM
> *To: *llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>
> 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).
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190510/a13abaf3/attachment.html>
More information about the llvm-dev
mailing list