logoalt Hacker News

zozbot234yesterday at 8:16 AM3 repliesview on HN

Wasm now supports multiple modules and multiple linear memories per module, so it ought to be quite possible to compile C to Wasm in a way that enforces C's object access rules, much like CHERI if perhaps not Fil-C itself.


Replies

favflamtoday at 2:32 AM

The multiple linear memory is supported in wasi preview 3? I thought it was not supported as of preview 2.

pjmlpyesterday at 1:31 PM

Some WebAssembly runtimes now do support those parts of the specification.

IshKebabyesterday at 8:44 AM

You wouldn't be able to get quite as fine-grained. One memory per object is probably horrifically slow. And I don't know about Fil-C, but CHERI at least allows capabilities (pointers with bounds) to overlap and subset each other. I.e. you could allocate an arena and get a capability for that, and then allocate an object inside that arena and get a smaller capability for that, and then get a pointer to a field in that object and get capability just for that field.

show 2 replies