| 9 Mar 2025 |
Andrew | Then how do I add these targets via nixpkgs? | 16:02:56 |
ghpzin | 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 |
emily | wasm32-unknown-unknown comes out of the box. otherwise pkgsCross | 16:03:15 |
Andrew | I can't combine latest for main target and latest for other targets? | 16:04:28 |
Andrew | * I can't combine stable for main target and latest for other targets? | 16:04:37 |
emily | no, you cannot mix rustc version and std version | 16:04:55 |
emily | those are tightly coupled | 16:04:57 |
emily | also, target support is not solely in std. | 16:05:04 |
Andrew | this is what fenix tells | 16:05:30 |
Andrew | what is pkgsCross? | 16:09:55 |
emily | pkgsCross.<system> is a Nixpkgs configured for cross-compiling to that system. | 16:10:37 |
Andrew | And which package I need to install for those targets? | 16:11:37 |
emily | probably pkgsCross.<system>.buildPackages.rustc | 16:12:26 |
Andrew | well damn, 2600 MiB is kinda a lot | 16:17:47 |
Andrew | And it also builds something? Why is that? | 16:18:17 |
Andrew | builds llvm-19.1.7 | 16:18:29 |
Andrew | not in the nixos cache? | 16:19:04 |
emily | cross build packages get rebuilt for the new target. for some things that's dumb and should be fixed though, like LLVM | 16:20:43 |
Andrew | so you're saying there should be a cache for llvm? | 16:21:24 |
Andrew | I'm not sure if you build the build tools for different target, how would I then be able to use them to build the program for that target if those build tools are not for my host target. | 16:23:02 |
emily | they are rebuilt for a different --target, but the same --host. | 16:23:18 |
Andrew | Or does it compile so that I can run them from the host target to build the target-target? | 16:23:26 |
emily | that is what pkgsCross.<system>.buildPackages means | 16:23:26 |
emily | no, I'm saying it's probably a packaging infelicity | 16:23:46 |
Andrew | uhhh, so there shouldn't be any cache for llvm? | 16:24:41 |
Andrew | 4467 steps is soo much... | 16:25:10 |
Andrew | home.packages = with pkgs; [
cargo
clippy
rustc
pkgsCross.wasi32.buildPackages.rustc
rustfmt
rust-analyzer-nightly
cargo-expand
pkg-config
];
| 16:47:03 |
emily | btw at least some WASI stuff should be cached because Firefox uses it. | 16:48:33 |
Andrew | I can't build llvm as it eats all of the memory at step 1321/4467 with a lot of llvm-tblgen processes. | 16:48:41 |
emily | ok.p | 16:48:49 |