Nix Rust | 718 Members | |
| Rust | 164 Servers |
| Sender | Message | Time |
|---|---|---|
| 9 Mar 2025 | ||
| 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 | |
| I would say a lot, probably. | 22:44:16 | |
| I hope this wouldn't trigger an llvm rebuild, otherwise it's joever. | 22:45:28 | |
| * I hope this won't trigger an llvm rebuild, otherwise it's joever. | 22:45:39 | |
| * I hope this won't trigger the llvm rebuild, otherwise it's joever. | 22:45:44 | |
| this should work: https://github.com/CathalMullan/rust-wasi-nix | 22:53:31 | |
| but you'll prob need to recompile llvm | 22:53:40 | |
| I think at this point, it's definitely not how it supposed to work, so should be a bug. | 23:35:00 | |
Download sadge 2x.webp | 23:35:37 | |
| yeah, all of this should 'just work', but since very few people currently rely on wasi, its never really tested. hopefully one day none of these hacks will be needed | 23:37:53 | |
| I mean... I'm pretty sure you can singlehandedly fix it if you make a patch to nixpkgs. | 23:46:56 | |
| Though idk if these are hacks or just missing pieces of the puzzle | 23:48:23 | |