Question about WebAssembly
mail at skoppe.eu
Thu Oct 3 18:40:42 UTC 2019
On Thursday, 3 October 2019 at 15:33:54 UTC, Max Haughton wrote:
> Is there still a barrier on having syscalls to use, e.g. being
> able to implement malloc/free? Assuming it's technically
> possible I would like to work on this but probably in 2020 :(
It all depends on what you want to do. If you want to write
client side web applications, you likely have no need for
syscalls, since you will just use the web apis, like I did in the
examples I posted earlier.
If you want your wasm to run outside the browser, e.g. in the
cloud, then your best bet would be to port druntime to WASI. Or
use the libc provided by the WASI C sdk and write bindings for
druntime for it.
On the other hand, I already have hello-world code running on
cloudflare workers (http://skoppe.nl/hello) and have also had
something on fastly as well.
In the next month or so I want to finish a document outlining my
approach to getting more of D supported in WebAssembly.
Ultimately that will require porting druntime, or at least its
most essential features.
What do you want to build?
More information about the Digitalmars-d