Status of WASM support?

Sebastiaan Koppe mail at skoppe.eu
Sat Aug 1 17:32:38 UTC 2020


On Saturday, 1 August 2020 at 16:32:16 UTC, Alexandru Ermicioi 
wrote:
> On Saturday, 1 August 2020 at 11:19:46 UTC, Sebastiaan Koppe 
> wrote:
>> The GC uses memory mapping to fetch and return memory. Wasm 
>> doesn't support it so I wrote a simple freelist on top of the 
>> wasm memory functions 
>> https://github.com/skoppe/druntime/blob/wasm/src/gc/os.d#L180 
>> so that I could connect it to the GC (I can't use stdx 
>> allocator in druntime).
>
> I see, can you explain reason why you can't use stdx allocator 
> in druntime?
>
> Ofc, we can't make direct dependency between druntime and 
> external lib, so I was thinking is it possible to abstract raw 
> memory allocation in gc into some kind of interface, and then 
> just write adaptor to wasm stdx for that interface, or any 
> other stdx compliant allocator or std.experimental allocator?

If you look in the os.d file I linked to earlier you will notice 
that it contains many versions of os_mem_map/os_mem_unmap for all 
kinds of targets. It is the interface you speak of.


More information about the Digitalmars-d mailing list