[OT] web assembly memory model

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Jan 3 03:57:30 UTC 2026


On 03/01/2026 4:24 PM, Walter Bright wrote:
> On 1/2/2026 6:37 PM, Richard (Rikki) Andrew Cattermole wrote:
>> Web assembly is segmented :(
> 
> They should have talked to me first!

I understand why they are doing it.

Its not like a traditional cpu ISA, its all typed.

The killer though for D is you can't get a pointer with whatever offset 
you want into a GC object.

There are some improvements being worked on:

https://github.com/WebAssembly/memory-control/blob/main/proposals/memory-control/Overview.md

https://github.com/WebAssembly/multibyte-array-access/blob/main/proposals/multibyte-array-access/Overview.md

But what we'd need to take full advantage is a reference type that can 
point to whatever segment of memory + an arbitrary offset, and do 
arithmetic on it.

Possible to do that due to it all being typed and JIT'd.

Funnily enough I watched a video on Web Assembly's GC today, left a 
comment about how its a bit of a disappointment that it is DOA for us.

https://www.youtube.com/watch?v=nbqjDEaRkVI


More information about the Digitalmars-d mailing list