Loading tutorials
Cargo.toml and working on the command line. No compiler internals are required.3 min readcargo build and cargo test, and that you have a rough idea of the rustc, LLVM and linker phases from the first chapter. Here you will use cargo check to make the edit-compile loop shorter.2 min readCargo.toml. You should also know that cargo build uses the dev profile by default.2 min readCargo.toml, and know that rustc splits a crate into codegen units before LLVM turns them into machine code. It builds on the dev profile settings from the previous chapter.3 min readCargo.toml, know what a Cargo feature is, and have run cargo build --timings from the earlier chapter on measuring.2 min readCargo.toml, run cargo build, and have seen #[derive(...)] in Rust code. You should also know the --timings report from the measuring chapter. Procedural macros and build scripts both run code during compilation, so they can add time that has nothing to do 3 min readCargo.toml, and read a .cargo/config.toml file. You should also know the build phases from the earlier chapter: rustc, LLVM, then the linker.3 min readCargo.toml, and have already measured a build with cargo build --timings. Here you will see why one large crate compiles slowly and how a workspace of smaller crates helps.3 min readcargo build --timings from the earlier measuring chapter.3 min readcargo test, know the difference between unit and integration tests, and have read the earlier chapters on linking and workspaces.3 min read.cargo/config.toml, know the difference between dependency crates and your own workspace crates, and have read the earlier chapters on incremental compilation and profiles.3 min readtarget/ directory holds, and how sccache works as a compiler cache. A CI runner usually starts from a clean machine, so every run compiles every dependency from scratch. Caching restores earlier work and cuts that cost.3 min readCargo.toml, run cargo build --release, and read the timing output from earlier chapters. Release builds trade compile time for runtime speed. Three profile settings control most of that trade: opt-level, codegen-units and lto.2 min readrustup, edit Cargo.toml and .cargo/config.toml, and read a cargo build --timings report. Both options here need the nightly toolchain. Their flags can change or disappear without notice, so treat them as optional experiments, not as the fou2 min read