from Hacker News

Ask HN: Can Tokio's Ecosystem Be Ported to Was(M/I)?

by poletopole on 8/12/21, 9:28 PM with 1 comments

I'm still somewhat new to Rust and low level programming but understand the language, theory, and as well as C. However, I have no idea if porting Tokio's ecosystem to WASI/WASM at this point in time is even possible or practical (I know threads are relatively new).

Why do this? I've been planning a distributed, asynchronous, multiplexed protocol (called IOTAP) that you could say is L8+ (but is semantically just HTTP on each level after the base level), but tunnels over H3 and interoperates generically with any lower level transport in theory. The state transfer and representation system is beyond the scope of this question but basically requests are inverted in a sense but not RPC. So the client peer makes a request and the response is procedurally generated and compiled into WASM packet layers (for each protocol level) using differential data flow among other technologies--but it's all sandboxed with WASM; at first thought this sounds really slow, but think of it as more lazy evaluation perhaps. I was thinking about using Wasmer as the runtime but that's still up in the air.

Anyways, I really like Tokio and its ecosystem, but obviously the I/O will need to be ported, and that's no small task. Perhaps there's a better way to go about doing all this?

  • by poletopole on 8/12/21, 9:55 PM

    I think I answered my own question by asking it. I think only the DDF would have to be ported. However, further discussion is welcome, since I'm still curious about Tokio's future with WASM.