Nix Rust | 702 Members | |
| Rust | 160 Servers |
| Sender | Message | Time |
|---|---|---|
| 9 Mar 2025 | ||
I tried pkgsCross.wasi32.buildPackages.libunwind and libunwind and it didn't help. | 18:22:23 | |
| but at least llvm compiled successfully. In one hour. | 18:22:40 | |
| It should install that automatically anyway, otherwise what's the point in reproducibility. | 18:23:20 | |
| 18:28:25 | |
| maybe it was broken at some point | 18:28:37 | |
if you are using flakes try a nix flake update nixpkgs | 18:29:05 | |
| I updated it just one day ago | 18:29:21 | |
| it says it's from 2025-03-06 | 18:30:19 | |
you need to build the pkgsCross.wasi32.buildPackages.rustc | 18:37:08 | |
| yeah, started the build | 18:37:23 | |
llvm> [17/4467] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o | 18:38:00 | |
| Well, good luck. | 18:38:35 | |
| Is it still going? | 19:57:07 | |
| 10 Mar 2025 | ||
got past that (I think) but getting this
don't know much about wasi or cross compilation | 02:51:22 | |
| 😅 I had to sleep | 02:53:09 | |
is pkgsCross.wasi32.buildPackages.rustc supposed to work normally /p.q? | 02:54:52 | |
* is pkgsCross.wasi32.buildPackages.rustc supposed to work normally /p.q\? | 02:54:55 | |
* is pkgsCross.wasi32.buildPackages.rustc supposed to work normally? | 02:55:05 | |
In reply to @phanirithvij:matrix.orgUnderstandable. | 03:34:48 | |
| I did find some context for this: https://github.com/rust-lang/rust/issues/73432#issuecomment-647079886 | 03:49:21 | |
emily, so is the pkgsCross.wasi32.buildPackages.rustc broken then? | 10:13:17 | |
| Andrew: I've been looking into WASI cross compilation lately. Managed to get it working, but required quite a few 'hacks'. See the overlays here: https://github.com/DuskSystems/nix-zed-extensions | 19:29:05 | |
| Is this the whole hack?
| 22:33:09 | |
| * Is this the whole hack?
| 22:33:27 | |
| no, thats just creating a custom cross target, since i specifically needed wasip2, where nix defaults to wasip1 | 22:34:04 | |
| the other overlay has the bulk of the hack | 22:34:23 | |
| the tldr is: build a mock wasi-sdk, and setup the correct env variable to let rustc use it. then include libunwind as well. then use lld for linking | 22:36:11 | |
| i can create a minimal reproduction, gimme a few mins | 22:39:16 | |
| looks awful, but I see the already known libunwind and wasi-sdk packages, so I guess the truth was somewhere very close. | 22:43:32 | |
| that is indeed quite a few hacks | 22:43:57 | |