Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> or even -O5

-O4 and higher are (currently) equivalent to -O3

> I don't depend on serde because I knew it is bloated but didn't know serde_json was so bloated too.

serde_json depends on serde though?

> I don't think there are any template use in either project except things like hashmaps and slices etc. I don't use traits except to interact with dependencies in rust.

If you're interested in investigating further it might be worth trying cargo bloat [0] or similar to get a bit more data about what is consuming space. rustc's self-profiling framework [1] might be another way to get data.

[0]: https://github.com/razrfalcon/cargo-bloat

[1]: https://github.com/rust-lang/measureme

 help



> serde_json depends on serde though?

Ahhh, of course.

Thanks for the suggestions.

Edit: I was able to reduce the output code size to <600KB from the original 1.3MB after exploring the suggestions. It made the release build time a lot longer but it is worth it for my use case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: