!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

704 Members
Rust162 Servers

Load older messages


SenderMessageTime
29 Mar 2026
@whispers:catgirl.cloudwhispers [& it/fae]the final step is a full stage 2 build which builds standard libraries for several targets, documentation, and several other things19:34:34
@pyrox:pyrox.devdish [Fox/It/She]why are we building std for several targets? is that so it can include wasm std, or is that something we could disable?19:35:09
@whispers:catgirl.cloudwhispers [& it/fae]wasm and bfpel-* something, yeah19:35:23
@whispers:catgirl.cloudwhispers [& it/fae] I'm not entirely sure why the mrustc end is slow, but i think it mostly boils down to the fact that it's a two stage build. the first stage is just building rustc with mrustc, but i think this makes stage 2 pretty slow because rustc is fairly reliant on optimizations, which mrustc doesn't do much of 19:36:38
@whispers:catgirl.cloudwhispers [& it/fae]but that's just my theory, i haven't looked into that side and there's a solid chance you could cut it down19:36:55
@whispers:catgirl.cloudwhispers [& it/fae]you could maybe amortize that cost across 1.90 and 1.91 by making "stage 2" just be building 1.91 (but you may be prone to miscompilation since mrustc isn't tested like that, i don't know)19:38:49
@pyrox:pyrox.devdish [Fox/It/She] okay you should be able to build without extra stdlibs by setting fastCross = true; in the final build derivation where you override rustc-unwrapped 19:39:51
@pyrox:pyrox.devdish [Fox/It/She]that also skips some other builds, quoting the code it "reuses the rustc from build"19:40:41
@whispers:catgirl.cloudwhispers [& it/fae]for comparison, each of the intermediate builds compiles six things: bootstrap, rustc, standard libraries, cargo, rust-installer, and generate-copyright (and I'll rip out those last two as soon as i next decide to look into it)19:40:37
@pyrox:pyrox.devdish [Fox/It/She] https://github.com/NixOS/nixpkgs/blob/46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9/pkgs/development/compilers/rust/rustc.nix#L39 19:40:45
@whispers:catgirl.cloudwhispers [& it/fae]we don't want to do that, that phase is what builds rustc. doing a stage 2 build (theoretically) gives us the best binary for building everything else with19:41:40
@whispers:catgirl.cloudwhispers [& it/fae]and is the "intended" way for rustc to be distributed19:41:57
@whispers:catgirl.cloudwhispers [& it/fae] * 19:42:24
@pyrox:pyrox.devdish [Fox/It/She]yeah fair19:42:40
@whispers:catgirl.cloudwhispers [& it/fae] i did notice some weird build steps, like that build logs say "Building stage2 compiler artifacts" with the same information two or three times, but i don't know if that's because the logging is lacking or something else. (that's not unique to this, you can see the same logs on hydra) 19:44:07
@whispers:catgirl.cloudwhispers [& it/fae] * i did notice some weird build steps, like that build logs say "Building stage2 compiler artifacts" with the same information two or three times, but i don't know if that's because the logging is lacking or it's actually running duplicate builds. (that's not unique to this, you can see the same logs on hydra) 19:44:27
@whispers:catgirl.cloudwhispers [& it/fae] * 19:44:49
@whispers:catgirl.cloudwhispers [& it/fae] * 19:44:59
@whispers:catgirl.cloudwhispers [& it/fae] * 19:45:16
@whispers:catgirl.cloudwhispers [& it/fae]oh and stage 1 builds also break anything that links against rustc_private19:50:27
@whispers:catgirl.cloudwhispers [& it/fae]i don't remember the machinery involved with doing that (it might be nightly only?) so i don't know if anything in nixpkgs does that though19:51:03
@whispers:catgirl.cloudwhispers [& it/fae] * 19:51:39
@whispers:catgirl.cloudwhispers [& it/fae] * 19:53:04
@whispers:catgirl.cloudwhispers [& it/fae] * 19:53:18
@whispers:catgirl.cloudwhispers [& it/fae]okay yeah i think that's perma-unstable so basically a non-concern19:55:00
@pyrox:pyrox.devdish [Fox/It/She]removing rust-installer and generate-copyright from intermediate builds should be fairly easy, just a few-line patch20:17:21
@pyrox:pyrox.devdish [Fox/It/She]* removing rust-installer and generate-copyright from intermediate builds should be fairly easy, just a few-line patch from what i can see just looking at the code20:17:31
@whispers:catgirl.cloudwhispers [& it/fae] i think you can also just do it by passing the right command like flags to ./x.py install (specifying which things to install instead of just using the defaults) but i haven't tried 20:18:27
@whispers:catgirl.cloudwhispers [& it/fae] * i think you can also just do it by passing the right command like flags to ./x.py install (specifying which things to install instead of just using the defaults) but I'll have to test that later 20:20:36
@whispers:catgirl.cloudwhispers [& it/fae] * i think you can also just do it by passing the right command line flags to ./x.py install (specifying which things to install instead of just using the defaults) but I'll have to test that later 20:21:36

Show newer messages


Back to Room ListRoom Version: 6