logoalt Hacker News

deathanatostoday at 1:07 AM0 repliesview on HN

I suppose I should publish this, but a WASM module, in Rust, which just binds [ciborium] into JS only took me ~100 LoC. (And by this I mean that it effectively provides a "cbor_load" function to JS, which returns JS objects; I mention this just b/c I think some people have the impression that WASM can't interact with JS except by serializing stuff to/from bytestrings and/or JSON, which isn't really the whole story now with refs.)

But yes, a native implementation would save me the trouble!

[ciborium]: a Rust CBOR library; https://docs.rs/ciborium/latest/ciborium/