serde-rs / json

Strongly typed JSON library for Rust
Apache License 2.0
4.7k stars 536 forks source link

Binary size increase after #1107 (serde_json v1.0.112) #1114

Closed jbourassa closed 4 months ago

jbourassa commented 4 months ago

1107 which is included in serde_json v1.0.112 added ~9kb to Wasm binaries.

Here's a reproduction repo that has Wasm files & code for 111 vs 112: https://github.com/jbourassa/tmp-serde-112-bin-increase

I understand that serde isn't optimizing for binary size; so maybe that's an acceptable tradeoff for better error messages. If that's the case, feel free to close this issue. Unclear to me how to improve it, but if you have ideas, I'm happy to take as stab at it.

jbourassa commented 4 months ago

I got it wrong, 112 is actually smaller 🤦 . Not sure where my head was at, sorry about that.