www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - WebAssembly as a platform for abstraction

reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
Came across this interesting article recently about how WASM can 
be used to make it easy for users to add their own application 
logic:
http://adventures.michaelfbryan.com/posts/wasm-as-a-platform-for-abstraction/

... and hard not to think in this context of John Colvin's 
prescient remarks about the importance of WebAssembly from way 
back in 2015:
https://forum.dlang.org/post/tnzujgocuuvmkdqdsjmm forum.dlang.org

It's arguably a bit late by now to be "catching a wave", but 
what's the current state of the art in D's WebAsssembly support?  
And does anyone have any experience of using it as a way to offer 
extensibility to end users?
May 15 2020
parent reply Sebastiaan Koppe <mail skoppe.eu> writes:
On Friday, 15 May 2020 at 10:05:02 UTC, Joseph Rushton Wakeling 
wrote:
 Came across this interesting article recently about how WASM 
 can be used to make it easy for users to add their own 
 application logic:
 http://adventures.michaelfbryan.com/posts/wasm-as-a-platform-for-abstraction/

 ... and hard not to think in this context of John Colvin's 
 prescient remarks about the importance of WebAssembly from way 
 back in 2015:
 https://forum.dlang.org/post/tnzujgocuuvmkdqdsjmm forum.dlang.org

 It's arguably a bit late by now to be "catching a wave", but 
 what's the current state of the art in D's WebAsssembly 
 support?  And does anyone have any experience of using it as a 
 way to offer extensibility to end users?
I don't think it is too late at all. I have had some set-backs w.r.t. porting d-runtime, but there is nothing technical prevent completion. I have D running on cloudflare's edge network. They start up the module on each request (in less than 1 ms), beating any container/lambda thing I have seen. You can easily creating bindings to wasm3, or wasmer, or wasmtime, or any of the others, and host wasm code. Or use them to run your D code on a large variety of platforms, see https://github.com/wasm3/wasm3#status for a small list. The cool part is that other people are figuring out compatibility between all the languages that compile to wasm, and we just piggyback on that because of LDC.
May 15 2020
next sibling parent Sebastiaan Koppe <mail skoppe.eu> writes:
Case in point 
https://www.infoq.com/news/2020/05/webassembly-summit-containerless/
May 15 2020
prev sibling parent Dukc <ajieskola gmail.com> writes:
On Friday, 15 May 2020 at 10:25:21 UTC, Sebastiaan Koppe wrote:
 I don't think it is too late at all. I have had some set-backs 
 w.r.t. porting d-runtime, but there is nothing technical 
 prevent completion.
A few years back I though it would be cool if one could compile D to Java or .Net bytecode, so D could be better used as replacement for the non-system programming languages. But now I think that this is even better, as if I've understood correctly, Webassembly is more modern bytecode than the other two I mentioned. Holding thumbs up for DRuntime in Wasm for LDC 1.23!
May 18 2020