23 May 2025 |
John Ericson | In reply to @qyliss:fairydust.space IIRC @Ericson2314:matrix.org didn't think it was possible some time in the past Hmm? | 03:21:26 |
John Ericson | I definitely want to never build computers and standard libraries together | 03:21:39 |
John Ericson | I would love to crate2nix rustc | 03:21:59 |
Alyssa Ross | In reply to @Ericson2314:matrix.org I definitely want to never build computers and standard libraries together I remember you thinking more work had to be done upstream in Rust to enable it | 08:35:10 |
emily | I'm not sure why we can't just "fastCross all the things". my guess is because it will always build std for the host (and maybe build?) platform? | 08:36:42 |
emily | what I wonder is whether, e.g., a build system hack to skip that, plus -Zbuild-std , would work. my guess is: maybe no because it assumes it can build build.rs scripts without needing to worry about std ? | 08:37:33 |
emily | (-Zbuild-std doesn't work well with our existing paradigm because we'd build it for every single application and is also unstable. but it would be a good proof-of-concept.) | 08:37:54 |
rosssmyth | An alternative to -build-std is rustc_build_sysroot which miri uses
https://github.com/RalfJung/rustc-build-sysroot
But would require wiring it up for nixpkgs | 15:35:05 |
rosssmyth | * An alternative to -build-std is rustc_build_sysroot which miri (and some others) uses
https://github.com/RalfJung/rustc-build-sysroot
But would require wiring it up for nixpkgs | 15:35:13 |
John Ericson | So I think that upstream Cargo should be better and -Zbuild-std doing multiple solves is an ugly hack | 15:53:40 |
John Ericson | but that is for "not having a sysroot" and "not treating the standard library as special" | 15:53:56 |
John Ericson | for merely building things separately, we can still do that | 15:54:08 |
John Ericson | I have recreated the -Zbuild-std hack by mashing together two crates2nix package sets | 15:54:22 |
John Ericson | and even buildRustPackage could probably build a standard library sysroot more or less fine | 15:54:49 |
John Ericson | so the purely downstream thing would be basically replacing that python script they have in the rust repo with a bunch of buildRustPackage invocations | 15:55:19 |
John Ericson | according to the bootstrap process | 15:55:25 |
| 8roken joined the room. | 18:40:57 |
| paq joined the room. | 21:12:58 |
24 May 2025 |
| fromtheeast710 joined the room. | 05:09:44 |
fromtheeast710 | how can I use a toml file from within a flake?
rust = pkgs.rust-bin.fromRustupToolchainFile ''
[toolchain]
channel = "stable"
components = [ "rust-src" ]
profile = "minimal"
'';
| 05:12:41 |
fromtheeast710 | I don't want another config file in my project repo :v | 05:13:04 |
K900 | You can just not use fromRustupToolchainFile | 06:39:03 |
K900 | And specify things manually | 06:39:07 |
fromtheeast710 | using a config like this is more readable and allow for finer control of versions imo | 06:50:54 |
fromtheeast710 | I'm following this blogpost | 06:51:36 |
K900 | You can specify the exact same things in Nix directly | 06:52:05 |