Nix Rust | 704 Members | |
| Rust | 164 Servers |
| Sender | Message | Time |
|---|---|---|
| 27 Mar 2026 | ||
| i feel like this is a dupe of another PR | 03:02:14 | |
| just based off memory | 03:02:19 | |
| i’ll need to prof further tho | 03:02:24 | |
| prod | 03:02:26 | |
| @tomasajt:matrix.org already reviewed it as the author of fetchCargoVendor and stated:
| 12:22:29 | |
| Or more importantly, the concerns directly above that:
| 12:24:10 | |
| 29 Mar 2026 | ||
| 11:15:52 | ||
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is a little iffy, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible (there are probably still ways to shave off a little bit of time though), but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:32:23 | |
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is pretty bad, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible (there are probably still ways to shave off a little bit of time though), but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:32:34 | |
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is pretty bad, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible (there are probably still ways to shave off a little bit of time though), but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:32:45 | |
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is pretty bad, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible (there are probably still ways to shave off a little bit of time though), but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:33:05 | |
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is pretty bad, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible, but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:33:35 | |
(actually i lied, we can probably cut off a minute and a half from each of the intermediate builds, but we don't feel like looking more into bootstrap right now. but other than that, i think shaving off any further time from the intermediate builds would require diving deeper into compiler flags and whatnot that might help.) | 18:34:59 | |
(actually i lied, we can probably cut off a minute and a half from each of the intermediate builds, but we don't feel like looking more into bootstrap right now. but other than that, i think shaving off any further time from the intermediate builds would require diving deeper into compiler flags and whatnot that might help (or you know. running on a faster machine).) | 18:35:07 | |
(actually i lied, we can probably cut off a minute and a half from each of the intermediate builds, but we don't feel like looking more into bootstrap right now. but other than that, i think shaving off any further time from the intermediate builds would require diving deeper into compiler flags and whatnot that might help. (or you know. running on a faster machine)) | 18:35:16 | |
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is pretty bad, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible, but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:35:42 | |
(actually i lied, we can probably cut off a minute and a half from each of the intermediate builds, but we don't feel like looking more into bootstrap right now. but other than that, i think shaving off any further time from the intermediate builds would require diving deeper into compiler flags with diminishing returns. (or you know. running on a faster machine)) | 18:37:42 | |
so, we've been playing with rustc bootstrapping out of tree at https://codeberg.org/whispers/nebula/src/branch/meow/nix/pkgs/rust-bootstrap. the code itself is pretty bad, but we've got some initial performance metrics.
.override { ... }, so this is the part we build right now in nixpkgs.(take these as order of magnitude estimates, the numbers are extremely noisy. build were run on several different days with other things running on my laptop.) so yeah. the start and end of the chain are expensive, and both are fairly constant cost. the intermediate versions have a relatively small linear coefficient, and we've done what we're aware of to make these builds do as little work as possible, but it's probably not small enough to be tenable as the distance between stable and what mrustc supports grows. | 18:40:11 | |
* (actually i lied, we can probably cut off a minute and a half from each of the intermediate builds, but we don't feel like looking more into bootstrap right now. but other than that, i think shaving off any further time from the intermediate builds would require diving deeper into small things like compiler flags with diminishing returns. (or you know. running on a faster machine)) | 18:51:30 | |
| hmm, any reason why each end is so long? is it just because optimizations and rust being "like that"(tm) | 19:33:33 | |
| would definitely be nice to reduce those as much as possible, especially 1.90 since that's bootstrapping-only | 19:33:54 | |
| the final step is a full stage 2 build which builds standard libraries for several targets, documentation, and several other things | 19:34:34 | |
| 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 | |
| wasm and bfpel-* something, yeah | 19:35:23 | |
| 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 | |
| but that's just my theory, i haven't looked into that side and there's a solid chance you could cut it down | 19:36:55 | |
| 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 | |
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 | |
| that also skips some other builds, quoting the code it "reuses the rustc from build" | 19:40:41 | |
| 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 | |