File:Making a Rust crate compile faster.webm

Summary

Description
English: In this stream, we try to figured out why the `cargo` crate takes so long to build. We don't ultimately make a meaningful improvement, but we do explore the many tools that exist to help with both analysis and remediation, and the value (and shortcomings) of each one.

Why is my Rust build so slow? https://fasterthanli.me/articles/why-is-my-rust-build-so-slow -Zsparse-registry https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html cargo --timings https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html#cargo---timings mold https://github.com/rui314/mold -Zshare-generics https://github.com/rust-lang/rust/blob/1f34da9ec8a85b6f86c5fa1c121ab6f88f2f4966/compiler/rustc_middle/src/ty/instance.rs#L112 cargo-bloat https://github.com/RazrFalcon/cargo-bloat Non-generic inner functions. https://www.possiblerust.com/pattern/non-generic-inner-functions cargo-llvm-lines https://github.com/dtolnay/cargo-llvm-lines -Zsymbol-mangling=v0 https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html -Zself-profile https://rust-lang.github.io/compiler-team/working-groups/self-profile/ crox https://github.com/rust-lang/measureme/blob/master/crox/README.md miniserde https://github.com/dtolnay/miniserde watt https://github.com/dtolnay/watt Where rustc spends its time. https://wiki.alopex.li/WhereRustcSpendsItsTime

0:00:00 Introduction 0:02:27 Setting up a test project 0:08:25 cargo build --timings 0:16:45 Linking 0:29:30 cargo bloat 0:40:50 -Zshare-generics 0:47:00 cargo-llvm-lines 1:24:56 rustc -Zself-profile 2:04:36 perf record rustc 2:13:10 miniserde 2:16:35 watt 2:25:00 Conclusion 2:25:40 Q&A 2:26:58 Overhead of monomorphization 2:27:51 Rust build time in 2-3 years 2:30:04 Do this again with new tools? 2:30:59 Breaking Cargo into subcrates 2:32:20 Is --release time important? 2:32:56 Automatic inner functions 2:34:46 Rust build time and adoption 2:37:00 Proc macro build time 2:41:25 Feature creep in Rust 2:43:05 Outroduction

Live version with chat: https://www.youtube.com/watch?v=vxB4R2Guwp8
Date
Source YouTube: Making a Rust crate compile faster – View/save archived versions on archive.org and archive.todayCategory:Media from YouTube
Author Jon Gjengset

Licensing

This video, screenshot or audio excerpt was originally uploaded on YouTube under a CC BY license.
Their website states: "YouTube allows users to mark their videos with a Creative Commons CC BY license."
To the uploader: You must provide a link (URL) to the original file and the authorship information if available.
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
Attribution:
Jon Gjengset
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Category:CC-BY-3.0#Making%20a%20Rust%20crate%20compile%20faster.webm
Category:Media from YouTube#Making%20a%20Rust%20crate%20compile%20faster.webm
This file, which was originally posted to an external website, has not yet been reviewed by an administrator or reviewer to confirm that the above license is valid. See Category:License review needed for further instructions.
Category:License review needed (video)#153342170 Category:Uploaded with video2commons Category:Videos of Rust (programming language)
Category:CC-BY-3.0 Category:License review needed (video) Category:Media from YouTube Category:Uploaded with video2commons Category:Videos of Rust (programming language)