!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

696 Members
Rust157 Servers

Load older messages


SenderMessageTime
8 Feb 2025
@niklaskorz:korz.devNiklas Korzso arguably eBPF could be added here too15:14:42
@niklaskorz:korz.devNiklas Korz or more specifically, bpfel-unknown-none and bpfeb-unknown-none 15:15:28
@niklaskorz:korz.devNiklas KorzMaybe only when targeting Linux, and only one of the two endians depending on arch15:19:30
@niklaskorz:korz.devNiklas KorzMight take a shot at an exemplary staging PR later, gonna go for a walk now15:24:06
@9hp71n:matrix.orgghpzinIf it can get away with not building on hydra, then you can probably do cross with toolchain. Iirc there is something in nixpkgs that does it.17:36:40
@qyliss:fairydust.spaceAlyssa Ross
In reply to @niklaskorz:korz.dev
Maybe only when targeting Linux, and only one of the two endians depending on arch
IMO more rustc targets we can build into a single compiler, the better
17:50:21
@qyliss:fairydust.spaceAlyssa Rossthe reason we only have wasm in there atm is that it was the only once i could get to build17:51:42
@qyliss:fairydust.spaceAlyssa Rossif more can be built in now let's add them in every situation we can17:51:58
@marcel:envs.net@marcel:envs.net joined the room.20:25:55
@niklaskorz:korz.devNiklas KorzI see 💯 will give it a shot for the bpf targets20:52:21
@niklaskorz:korz.devNiklas Korz hm so that's mainly beind hindered by BPF only supporting no_std, gotta look tomorrow if there is something like --target for only building core, not std 23:18:35
9 Feb 2025
@qyliss:fairydust.spaceAlyssa RossI remember the main problem with adding no_std was that it would try to build non-existent std documentation. That probably needs fixing upstream.07:11:30
@niklaskorz:korz.devNiklas KorzI see, so odds are that you can't build that a documented yet. I'll ask for clarification on the pending docs PR for the BPF targets.09:26:48
@niklaskorz:korz.devNiklas Korz* I see, so odds are that you can't build that as documented yet. I'll ask for clarification on the pending docs PR for the BPF targets.09:26:52
@qyliss:fairydust.spaceAlyssa RossYou can, but you can't do it if you're also building targets that have std, I think09:29:49
@qyliss:fairydust.spaceAlyssa Rosssomething like that09:29:50
@niklaskorz:korz.devNiklas Korzso the solution would be to do something like we did before with rustc-wasm32?09:31:25
@niklaskorz:korz.devNiklas Korzas that also disabled building docs09:31:29
@qyliss:fairydust.spaceAlyssa RossNo, please no more Rust compilers09:31:47
@qyliss:fairydust.spaceAlyssa RossThe solution is for Rust's build system to be fixed.09:31:54
@niklaskorz:korz.devNiklas Korzok, I'll raise it on the docs PR after all then, at the very least to get that behavior documented09:32:34
@qyliss:fairydust.spaceAlyssa Rosstry adding the bpf target to Nixpkgs' rustc if you haven't already first though, just in case this has been fixed since last timme09:33:49
@qyliss:fairydust.spaceAlyssa Ross * 09:34:00
@qyliss:fairydust.spaceAlyssa Rossor in case it's now broken for some other reason09:34:07
@niklaskorz:korz.devNiklas Korzyeah I did that, and ended up with errors in std related to atomic types09:34:28
@qyliss:fairydust.spaceAlyssa Rossoh! then it might be even more broken than just the docs problem09:34:50
@niklaskorz:korz.devNiklas Korzbrb checking at which stage it failed09:53:46
@sandro:supersandro.deSandro 🐧

So

diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index d7a1ee625f9c..92e0997a3e19 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -161,6 +161,7 @@
             # Other targets that don't need any extra dependencies to build.
           ]
           ++ optionals (!fastCross) [
+            "bpfel-unknown-none"
             "wasm32-unknown-unknown"

             # (build!=target): When cross-building a compiler we need to add
diff --git a/pkgs/development/python-modules/mitmproxy-linux/default.nix b/pkgs/development/python-modules/mitmproxy-linux/default.nix
index 01bacdb002ed..0ee05f35dcb4 100644
--- a/pkgs/development/python-modules/mitmproxy-linux/default.nix
+++ b/pkgs/development/python-modules/mitmproxy-linux/default.nix
@@ -18,6 +18,13 @@
     tag = "v${version}";
     hash = "sha256-lWUHdS+AkMnIg+1SR+9fC+YjcyLK80UknwGablniLSg=";
   };
+
+  postPatch = ''
+    substituteInPlace mitmproxy-linux/build.rs \
+      --replace-fail '"-Z",' "" \
+      --replace-fail '"build-std=core",' ""
+  '';
+
   cargoDeps = rustPlatform.fetchCargoVendor {
     inherit pname version src;
     hash = "sha256-ihbVh73eulqFyKC49KfsCFJqahr3nWVFFc97iFFf3Nk=";

will not just work?

16:59:25
@niklaskorz:korz.devNiklas Korz
rustc> Documenting stage2 library {alloc, core, panic_abort, panic_unwind, proc_macro, std, sysroot, test, unwind} in HTML format (aarch64-apple-darwin -> bpfel-unknown-none)

so it's the docs after all

09:54:33
@sandro:supersandro.deSandro 🐧yep, the build just failed with those 😕17:05:55

Show newer messages


Back to Room ListRoom Version: 6