-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I know this involves a lot of design work and problems to tackle. Yet, in the long run I think the need for spawning wasm components will arise. In my naive view the interface would expect the binary component code and allow for composition to, e.g., pass stdin stream data and read stdout stream data from the currently running component. Since this consumes new host memory, the spawning is allowed to fail due to runtime memory limits.
One could emulate this behavior by running a wasm interpreter (since bytecode generation would not help) but it bloats the overall binary size and the speed of the spawned component would be slow. Also, I think that this would be the last piece in a real "wasm OS" where the part that compositions components does not need to be native code and thus any wasm runtime can run it. Think about a simple wasm shell - one can do this in native code or JS for the browser but not in wasm as of now.