News for hackers. Stuff that matters.
Re:We rewrote our Rust WASM Parser in TypeScript – and it go... by nallana on Friday March 20, 2026 @07:48PM (#47462405)
Why not a shared buffer? Serializing into JSON on this hot path should be entirely avoidable
Re:We rewrote our Rust WASM Parser in TypeScript – and it go... by mavdol04 on Friday March 20, 2026 @08:28PM (#47462721)
I think a shared array just avoids the copy, not the serialization which is the main problem as they showed with serde-wasm-bindgen test
Re:We rewrote our Rust WASM Parser in TypeScript – and it go... by notnullorvoid on Saturday March 21, 2026 @04:02PM (#47470724)
You can avoid the serialization in WASM by pushing structured bytes to the SharedArrayBuffer, then do serialization in JS which should be relatively cheap compared to pushing JSON strings across the boundary.