"Emscripten compiles C and C++ to WebAssembly using LLVM and Binaryen" - can emscripten support more languages? #27165
Replies: 1 comment
-
|
If you look at the README in https://github.com/emscripten-core/emscripten it does also say: While Emscripten mostly focuses on compiling C and C++ using Clang, it can be integrated with other LLVM-using compilers (for example, Rust has Emscripten integration, with the wasm32-unknown-emscripten target). So, at least for llvm-based languages I think we a quite close. As for other languages that is much harder since for non-LLVM languages its not clear how we would link the different parts of the program together (emscripten uses wasm-ld for linking, but that only understands LLVM-compatible object files). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now emscripten can do this:
"Emscripten compiles C and C++ to WebAssembly using LLVM and Binaryen."
GraalVM kind of converts, say, python and ruby code, it can mix it with java and create an .exe, on windows systems - at the least in theory. But it does kind of work actually, to some extent.
Could emscripten also do this? E. g. not just C and C++ but Java, Go and many more languages?
I believe the net-benefit would be great. People could just default to use Emscripten rather than some special library for their own language here. Anyway just an idea.
Beta Was this translation helpful? Give feedback.
All reactions