介绍

优化包括性能优化、编译文件大小优化和编译时间优化。

参考资料

Rust 性能优化:

  1. https://nnethercote.github.io/perf-book/

编译文件大小裁剪:

  1. https://github.com/johnthagen/min-sized-rust

  2. https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html

  3. https://arusahni.net/blog/2020/03/optimizing-rust-binary-size.html

  4. https://mender.io/blog/building-mender-rust-in-yocto-and-minimizing-the-binary-size

  5. https://github.com/RazrFalcon/cargo-bloat

  6. https://github.com/orf/cargo-bloat-action CI 里构建 cargo bloat

  7. https://oknozor.github.io/blog/optimize-rust-binary-size/

编译时间优化:

  1. https://jondot.medium.com/8-steps-for-troubleshooting-your-rust-build-times-2ffc965fd13e