!UNVBThoJtlIiVwiDjU:nixos.org

Staging

308 Members
Staging merges | Running staging cycles: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Astaging-next+head%3Astaging-next-25.05 | Review Reports: https://malob.github.io/nix-review-tools-reports/105 Servers

Load older messages


SenderMessageTime
20 Sep 2025
@ghpzin:envs.netghpzin But do you expect for bindgen to always use those things by default ? 18:51:31
@emilazy:matrix.orgemily yes. what bindgen does is use libclang to read C code and generate Rust bindings based on that 18:51:35
@emilazy:matrix.orgemilybindgen is, essentially, Clang18:51:43
@emilazy:matrix.orgemilywe have the hook so that it can find glibc, the dependencies of the derivation, etc.18:51:52
@lt1379:matrix.orgLunduplicating something that would be correct alone is enough to mess up include_next iirc?18:52:13
@emilazy:matrix.orgemily we use the flags from @clang@ because it is a kind of Clang, so it needs the Clang logic from cc-wrapper rather than the GCC logic 18:52:14
@emilazy:matrix.orgemily for atomics though I'm not quite sure, because I think that might be a libgcc vs. compiler-rt distinction 🄓 18:52:40
@qyliss:fairydust.spaceAlyssa RossWhy does mesa even have bindgenHook18:53:11
@qyliss:fairydust.spaceAlyssa Rosssurely it doesn't use the bindgen crate, being a meson project18:53:19
@qyliss:fairydust.spaceAlyssa Rossyep, doesn't look like it…18:53:47
@emilazy:matrix.orgemilyas in it's just using the bindgen CLI?18:54:12
@emilazy:matrix.orgemilyand our hook breaks the CLI?18:54:16
@qyliss:fairydust.spaceAlyssa Rossyeah18:54:16
@emilazy:matrix.orgemily ah, pkgs/development/tools/rust/bindgen/wrapper.sh 18:54:32
@qyliss:fairydust.spaceAlyssa Ross(yeah, it's just using the bindgen CLI)18:54:36
@emilazy:matrix.orgemilyit seems like we should make our hook and our wrapper not break each other18:54:42
@emilazy:matrix.orgemily bindgenHook should surely at worst be a nop 18:54:42
@qyliss:fairydust.spaceAlyssa Rossyes, but separately, it shouldn't be there18:54:57
@emilazy:matrix.orgemilywe could drop our wrapper, and rely only on the hook to make the unwrapped CLI work18:54:58
@emilazy:matrix.orgemilyor we could make our wrapper detect the hook and overwrite or not duplicate its work18:55:09
@emilazy:matrix.orgemily(I of course prefer the solution with less wrapper)18:55:23
@emilazy:matrix.orgemily(the CLI could propagate the hook)18:55:29
@qyliss:fairydust.spaceAlyssa Rossor we could just not allow both of them to be used at once, because it's always going to be a mistake…18:55:30
@emilazy:matrix.orgemilyis it?18:55:36
@emilazy:matrix.orgemilywhat if your build uses the crate in one place but the CLI in another?18:55:43
@qyliss:fairydust.spaceAlyssa Rossthat would be very, very strange18:55:52
@emilazy:matrix.orgemilybuilds are weird :)18:56:00
@emilazy:matrix.orgemilyit seems entirely possible with vendored deps18:56:04
@dramforever:matrix.orgdramforeveri wonder if there's a way to get bindgen to dump the full command line18:56:17
@qyliss:fairydust.spaceAlyssa Rossif you were vendoring the crate you'd have no reason to use the CLI18:56:19

Show newer messages


Back to Room ListRoom Version: 6