D and WebAssembly (Wasm)
Adam D Ruppe
destructionator at gmail.com
Mon Sep 13 16:33:28 UTC 2021
On Monday, 13 September 2021 at 16:19:31 UTC, Kenneth Dallmann
wrote:
> Rumor has it that D can compile to Wasm, but only in the
> "BetterC" subset.
See some of my little demos here:
http://webassembly.arsdnet.net/
a blog post about it
http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_10.html
and some source for the support code
http://github.com/adamdruppe/webassembly/
the approach I took is a miniature custom runtime but there's
also the possibility of a druntime port to the wasi emscripten
uses
https://github.com/skoppe/druntime/tree/wasm
though none of these are complete.
Anyway, the point of my little demo is in 50 KB of webasm I had
my basic game demos running in the browser.
I did partial source ports that just call out to javascript
instead of relying on a copied stdlib. Makes more sense that way
to me and also produces smaller binaries.
More information about the Digitalmars-d
mailing list