3 ms·
This is brilliant. Very excited to see more applications like this making great use of the possibilities of Rust+WASM. One thing that stuck out to me was the
by couchand 9y ago
This is brilliant. Very excited to see more applications like this making great use of the possibilities of Rust+WASM.
One thing that stuck out to me was the exploded-struct callback mechanism for reporting Mappings back to JS. I've also been struggling to handle the low-bandwidth interface between JS and WASM. That wasn't a strategy I'd considered, but it's pretty neat.
It's simple enough and will work in this case, but unfortunately doesn't generalize very well. I've been exploring using well-defined binary encoding for this purpose (specifically Cap'n'Proto, but Protobuf or another binary encoding would work, too).
See an example I put together: https://github.com/couchand/rust-wasm-capnproto-example https://github.com/couchand/rust-wasm-capnproto-example. I'm definitely going to go back and clean that up with some of the FFI patterns from this article.