4 ms·
So far Zig, Odin and Go are the best languages for WASM C/C++ is a solid choice too thanks to EMSCRIPEN, but it is very slow to compile, and is not very clean
by Shadonototra 4y ago
So far Zig, Odin and Go are the best languages for WASM
C/C++ is a solid choice too thanks to EMSCRIPEN, but it is very slow to compile, and is not very clean solution
dotnet is just too big for WASM
rust is too complicated slow to program with
- moonchrome 4y agoThis is a WASM runtime/interpreter written in Go - not a Go compiler/runtime for WASM.
- mamidon 4y agoI've heard about wasm native gc for years. How can I see the actual status of the proposal? I'm not sure if they're actually working on it or blocked for some reason
- adrianfcole 4y agoThere's a proposals repo [1] that tracks the status of features like GC. According to that, GC is phase 2, which is prototyping [2]. To get to the finish line, implementations including at least 2 browsers need to happen (this is a Web standard, so there's some browser bias in the process). It is not straight forward to see who and what are implementing a proposal, especially if not tracked in the roadmap [3]. Best advice I could give for now is to watch the proposal repo [4], or just wait. It may be a while on this one. [1]: https://github.com/WebAssembly/proposals https://github.com/WebAssembly/proposals [2]: https://github.com/WebAssembly/meetings/blob/main/process/phases.md#2-proposed-spec-text-available-community--working-group https://github.com/WebAssembly/meetings/blob/main/process/ph... [3]: https://webassembly.org/roadmap/ https://webassembly.org/roadmap/ [4]: https://github.com/WebAssembly/gc https://github.com/WebAssembly/gc
- kaba0 4y agoGo has a runtime that has to be included, with GC running alongside the app. So no, it is not at all a good fit for Wasm, until the latter’s GC proposal gets finalized.
- adrianfcole 4y ago(wazero maintainer) we have a popular allocation example, which shows how GC ends up embedded (really malloc/free) in wasm produced by Rust or TinyGo. You are right that whatever produces wasm, if needs to allocate memory, is doing that by embedding some implementation into the wasm (during compilation). [1] https://github.com/tetratelabs/wazero/tree/main/examples/allocation https://github.com/tetratelabs/wazero/tree/main/examples/all...
- jedisct1 4y ago> it is very slow to compile Emscripten is amazing if you need a full POSIX environment in a web browser. Everything is emulated through Javascript calls. If you don't need that, or just need the WASI subset, you can simply use Zig to compile C/C++ code to WebAssembly ("zig cc -target wasm32-wasi"). Compilation is as fast as other targets.