ironthree / dxr

Declarative XML-RPC in Rust
Apache License 2.0
17 stars 8 forks source link

investigate improving binary sizes #14

Closed decathorpe closed 3 months ago

decathorpe commented 1 year ago

I am not sure what causes binaries (like simple client example binaries) to be as big as they are (multiple MB in release mode), but it might be due to monomorphization of some core functions.

Maybe things could be slightly improved using the "non-generic inner function" trick for some of these generic functions?

decathorpe commented 3 months ago

With the updates to hyper 1 / reqwest 0.12 / axum 0.7 and some changes to the client interface, example binaries are now ~30% smaller. Not sure which change contributed how much to this improvement, but just ~2MB per application binary seems pretty good now.