Question about WebAssembly
mail at skoppe.eu
Wed Oct 2 10:23:45 UTC 2019
On Wednesday, 2 October 2019 at 09:26:56 UTC, materus wrote:
> Are there any plans to support webassembly?
> I know betterC is working but i mean full language.
> All i found was there is problem with GC but Go and C# works so
> what's preventing D to work?
The short answer is manpower.
Long answer depends on what you mean by working. Go produces very
large binaries, and C# currently works by emulating dlls in your
browser. TinyGo is an option but doesn't support the full
language [https://tinygo.org/lang-support/]. Rust is the most
mature, mostly because it doesn't have a runtime to port, so it
is a lot easier.
With D the main issue is that someone needs to port druntime to
wasm. I am working on it in my spare time, but progress is slow.
Here are some examples of what I have got running:
https://skoppe.github.io/spasm/examples/todo-mvc/ -> famous
https://skoppe.github.io/spasm-imgui/ -> use c++ library
https://skoppe.github.io/spasm/examples/underrun/ -> ported js
More information about the Digitalmars-d