!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

615 Members
Rust136 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
23 May 2025
@Ericson2314:matrix.orgJohn 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
@Ericson2314:matrix.orgJohn EricsonI definitely want to never build computers and standard libraries together 03:21:39
@Ericson2314:matrix.orgJohn EricsonI would love to crate2nix rustc03:21:59
@qyliss:fairydust.spaceAlyssa 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
@emilazy:matrix.orgemily 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
@emilazy:matrix.orgemily 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
@emilazy:matrix.orgemily (-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:matrix.orgrosssmythAn 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:matrix.orgrosssmyth * 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
@Ericson2314:matrix.orgJohn EricsonSo I think that upstream Cargo should be better and -Zbuild-std doing multiple solves is an ugly hack15:53:40
@Ericson2314:matrix.orgJohn Ericsonbut that is for "not having a sysroot" and "not treating the standard library as special"15:53:56
@Ericson2314:matrix.orgJohn Ericsonfor merely building things separately, we can still do that15:54:08
@Ericson2314:matrix.orgJohn EricsonI have recreated the -Zbuild-std hack by mashing together two crates2nix package sets15:54:22
@Ericson2314:matrix.orgJohn Ericsonand even buildRustPackage could probably build a standard library sysroot more or less fine15:54:49
@Ericson2314:matrix.orgJohn Ericsonso the purely downstream thing would be basically replacing that python script they have in the rust repo with a bunch of buildRustPackage invocations15:55:19
@Ericson2314:matrix.orgJohn Ericsonaccording to the bootstrap process15:55:25
@8roken:matrix.org8roken joined the room.18:40:57
@paq:matrix.orgpaq joined the room.21:12:58
24 May 2025
@fromtheeast:matrix.orgfromtheeast710 joined the room.05:09:44
@fromtheeast:matrix.orgfromtheeast710

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
@fromtheeast:matrix.orgfromtheeast710I don't want another config file in my project repo :v05:13:04
@k900:0upti.meK900 You can just not use fromRustupToolchainFile 06:39:03
@k900:0upti.meK900And specify things manually 06:39:07
@fromtheeast:matrix.orgfromtheeast710using a config like this is more readable and allow for finer control of versions imo06:50:54
@fromtheeast:matrix.orgfromtheeast710 I'm following this blogpost 06:51:36
@k900:0upti.meK900You can specify the exact same things in Nix directly 06:52:05

Show newer messages


Back to Room ListRoom Version: 6