!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

691 Members
Rust156 Servers

Load older messages


SenderMessageTime
7 Mar 2025
@adam_neverwas:matrix.orgAdam Neverwas joined the room.15:48:59
@qyriad:katesiria.orgQyriad changed their display name from Qyriad to qyriad.16:46:04
@tomasajt:matrix.orgToma
In reply to @rosssmyth:matrix.org
buildRustPackage has finalAttrs now. I'm happy.
To clarify, currently buildRustPackage's attr construction function doesn't actually utilize the finalAttrs part yet, so e.g. if you override cargoHash it wont actually get changed inside the FOD.
So ATM it's just the plain old logic + support for usage of the finalAttrs pattern by consumers (which is still great)
19:19:18
@k900:0upti.meK900<bait>can we just disable fat lto globally</bait>19:28:37
@k900:0upti.meK900(this message is brought to you by uv taking 30 minutes and 10GB of RAM to build with fatlto)19:49:51
@charles:computer.surgeryCharles
In reply to @k900:0upti.me
can we just disable fat lto globally
think of the children
19:58:49
@antifuchs:asf.computerantifuchswho would want to put a 40-year-old file system on tapes...20:45:25
8 Mar 2025
@antrz:matrix.organtrz set a profile picture.19:06:45
@qyriad:katesiria.orgQyriad changed their display name from qyriad to Qyriad.21:41:03
9 Mar 2025
@andrew15_5:matrix.orgAndrew joined the room.15:32:07
@andrew15_5:matrix.orgAndrew

I have this:

  home-manager.users.${user} = {
    home.packages = with pkgs; [
      (fenix.stable.withComponents [
        "cargo"
        "clippy"
        "rust-src"
        "rustc"
        "rustfmt"
      ])
      fenix.targets.wasm32-wasip1.latest.rust-std
      fenix.targets.wasm32-wasip2.latest.rust-std
      fenix.targets.wasm32-unknown-unknown.latest.rust-std
      rust-analyzer-nightly
      cargo-expand
      pkg-config
    ];

But cargo build still doesn't see any of the wasm targets installed. I used the overlay usage approach.

15:34:08
@andrew15_5:matrix.orgAndrew *

I have this:

  nixpkgs.overlays = [inputs.fenix.overlays.default];
  home-manager.users.${user} = {
    home.packages = with pkgs; [
      (fenix.stable.withComponents [
        "cargo"
        "clippy"
        "rust-src"
        "rustc"
        "rustfmt"
      ])
      fenix.targets.wasm32-wasip1.latest.rust-std
      fenix.targets.wasm32-wasip2.latest.rust-std
      fenix.targets.wasm32-unknown-unknown.latest.rust-std
      rust-analyzer-nightly
      cargo-expand
      pkg-config
    ];

But cargo build still doesn't see any of the wasm targets installed. I used the overlay usage approach.

15:34:33
@andrew15_5:matrix.orgAndrewIs there a different place where the different targets needs to go?15:39:52
@andrew15_5:matrix.orgAndrew* Is there a different place where the different targets need to go?15:39:57
@9hp71n:matrix.orgghpzin You probably need to do it differently with fenix, I would try with combine:
https://github.com/nix-community/fenix/blob/6781661e331d1efe11023d4a35f2dfe65272f248/README.md?plain=1#L139-L151
15:53:37
@9hp71n:matrix.orgghpzin You probably need to do it differently with fenix, I would try with combine:
https://github.com/nix-community/fenix/blob/6781661e331d1efe11023d4a35f2dfe65272f248/README.md?plain=1#L139-L151
(ignoring how it would be better to do it in shell and not "globally" in your HM config)
15:58:10
@andrew15_5:matrix.orgAndrew
    home.packages = with pkgs; [
      (fenix.combine [
        (fenix.stable.withComponents [
          "cargo"
          "clippy"
          "rust-src"
          "rustc"
          "rustfmt"
        ])
        fenix.targets.wasm32-wasi.latest.rust-std
        fenix.targets.wasm32-wasip1.latest.rust-std
        fenix.targets.wasm32-wasip2.latest.rust-std
        fenix.targets.wasm32-unknown-unknown.latest.rust-std
      ])
      rust-analyzer-nightly
      cargo-expand
      pkg-config
    ];
15:59:17
@andrew15_5:matrix.orgAndrewDoesn't work.15:59:25
@andrew15_5:matrix.orgAndrew
 cb -r
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --target wasm32-wasi --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "wasm32-wasi". Run `rustc --print target-list` for a list of built-in targets
16:00:01
@emilazy:matrix.orgemilywhy use fenix for latest stable?16:00:15
@emilazy:matrix.orgemilyyou can just get it from Nixpkgs16:00:18
@andrew15_5:matrix.orgAndrewDoes it matter?16:00:42
@emilazy:matrix.orgemilyit might reduce your problems16:00:50
@emilazy:matrix.orgemilygenerally Nixpkgs Rust is less headache-inducing for cross in my experience16:01:03
@andrew15_5:matrix.orgAndrewThen how do I add these targets via nixpkgs?16:02:56
@9hp71n:matrix.orgghpzin Regarding your error, there is no wasm32-wasi target in stable.
I assume combine the way you want it, would look for it there.
16:03:15
@emilazy:matrix.orgemily wasm32-unknown-unknown comes out of the box. otherwise pkgsCross 16:03:15
@andrew15_5:matrix.orgAndrewI can't combine latest for main target and latest for other targets?16:04:28
@andrew15_5:matrix.orgAndrew* I can't combine stable for main target and latest for other targets?16:04:37
@emilazy:matrix.orgemily no, you cannot mix rustc version and std version 16:04:55

Show newer messages


Back to Room ListRoom Version: 6