capnproto / capnproto-rust

Cap'n Proto for Rust
MIT License
1.99k stars 220 forks source link

CapnProto Rust RPC + WASM + WebRTC #169

Open dioptre opened 4 years ago

dioptre commented 4 years ago

Hey anyone interested in mixing RPC + WASM + WebRTC. So far is just an interesting thought experiment but I could imagine it would be pretty great. Wonder if there are any major blockers to doing this?

indolering commented 2 years ago

It's something has been discussed in the larger Cap'n Proto and WASI communities, with quite a lot of discussion about what is the right level of abstraction to bake into WASM/WASI. My very out-of-date understanding is that the WASM team pushed back on specifying RPC at the bytecode level, which makes sense if you think of WASM as a virtual ISA. My thought is that WASI is supposed to be a systems interface and you should be using Cap'n Proto ... but I don't understand WASM's low level internals enough to be comfortable even bugging my friends to figure out if that critique would be productive contribution to that discussion.

At any rate, some quick googling turned up this project which uses Cap'n Proto Rust/JS to communicate with WASM instances. I would suggest you message the Cap'n Proto mailing list or jump on Sandstorm's IRC chat (#sandstorm@libera) and close this ticket to keep things tidy : )

Suyashtnt commented 1 week ago

With the changes that made serializing messages no-alloc and such, how is wasm RPC support looking like atm?

dwrensha commented 1 week ago

The capnp-rpc crate is stiill heavily dependent on heap allocation. Writing a no-alloc version would be a big project.