has the topic of mutually distrustful wasm modules ever been discussed? as i see it right now wasm assumes all modules that are linked together are mutually trusting (only talking about function calls right now)
even with the component modules shared nothing design function calls are assuming a well behaving callee
in particular id love to see catching traps at function calls and the ability to call functions with timeouts. though the latter probably doesn’t fit neatly into the current spec
the former could be modeled by having a function/instruction that calls the calle turning traps into exceptions
but id be curious if this has been discussed before
i guess untrusted calls would also limit inlining and other optimizations :thinking:
Jonas Kruckenberg said:
in particular id love to see catching traps at function calls and the ability to call functions with timeouts. though the latter probably doesn’t fit neatly into the current spec
https://github.com/WebAssembly/component-model/blob/main/design/high-level/Goals.md
Don't attempt to solve problems that are better solved by some combination of the toolchain, the platform or higher layer specifications, including:
[...]
* distributed computing and partial failure.
I think the component model is supposed to ensure confidentiality and integrity betwene mutually untrusting components, but not to ensure availability.
hmm yeah okay i can see that :thinking: makes sense for the component model
I believe the intention is to add both runtime component instantiation and partial failure support (i.e. the ability to limit the scope of a trap to a defined "blast radius") to the component model. I don't believe anything's been formally specified yet, but I know it's on the informal roadmap.
Joel Dice said:
I believe the intention is to add both runtime component instantiation and partial failure support (i.e. the ability to limit the scope of a trap to a defined "blast radius") to the component model. I don't believe anything's been formally specified yet, but I know it's on the informal roadmap.
cool yeah that’s exactly what i meant but put into better words :joy:
do you know by chance who to talk to?
@Luke Wagner (who is not currently subscribed to this channel, so he won't get that notification) is the one to talk to.
You could also open an issue (or search for an existing one) on https://github.com/WebAssembly/component-model, which he should see.
By the way, it’s already listed as a potential future feature here: Blast zones and shorty mentioned at the end of this section: Structured concurrency.
small update in case anyone is interested: i talked to luke at wasmio and he suggested (quite sensibly) that blast zones would require resourcified components
which would allow blast zones to essentially have the same api as joinhandles from rust stdlib or tokio
Last updated: Apr 07 2025 at 02:31 UTC