Skip to content

Both nix and rustix used in the dependency chain #9549

Open
0 of 1 issue completed
Open

Description

@ChrisDryden

I was looking into the different dependency chains more specifically in the stty package but also in the shared libraries and it was interesting to me how we have rustix in the dependency tree for every utility through the clap dependency. Given that both of these libraries should have the same functionality was wondering if it would be useful to move some of the nix usage over to rustix for the windows support.

I've also attached an example full build profile for stty that has the two PR's applied to show the speed improvements and the critical build paths:

Activity

  1. sylvestre commented on Dec 3, 2025

    @sylvestre
    SponsorContributor

    Yeah, we might want to use only one. Thanks

  2. oech3 commented on Dec 3, 2025

    @oech3
    Contributor

    I can't find list of BaudRates at rustix's src. Maybe, auto closes #8719 too?

  3. ChrisDryden commented on Dec 3, 2025

    @ChrisDryden
    CollaboratorAuthor

    I've been experimenting with it and I think it actually would solve the issue, I had a script to replicate the error in docker just confirming that it works now

  4. oech3 commented on Mar 2, 2026

    @oech3
    Contributor

    Can we still pass GNU tests depending on LD_PRELOAD after we replaced libc or nix calls with rustix for the case rustix uses syscall directly?

  5. mattsu2020 commented on Mar 5, 2026

    @mattsu2020
    Contributor

    Can we still pass GNU tests depending on LD_PRELOAD after we replaced libc or nix calls with rustix for the case rustix uses syscall directly?

    I think using Rustix is difficult.
    We have no choice but to use them selectively.

  6. oech3 commented on Mar 25, 2026

    @oech3
    Contributor

    Can we still pass GNU tests depending on LD_PRELOAD after we replaced libc or nix calls with rustix for the case rustix uses syscall directly?

    rustix has libc backend, but I guess we cannot mix raw and libc backend for perf.
    I would try to change GnuTests at upstream if LD_PRELOAD is needed.

  7. oech3 commented on Apr 11, 2026

    @oech3
    Contributor

    10 utils with nix dep left.

  8. xtqqczze commented on Apr 17, 2026

    @xtqqczze
    Collaborator

    It’s unlikely that nix can be removed from the dependency chain. For example, we rely on sigaction across all utilities, and this functionality is intentionally not implemented in rustix (see: bytecodealliance/rustix#628).

  9. oech3 commented on Apr 17, 2026

    @oech3
    Contributor

    Can we keep num of unsafe{} if we used libc at there?

  10. xtqqczze commented on Apr 17, 2026

    @xtqqczze
    Collaborator

    What would be the benefit over using nix with the signal feature?

  11. oech3 commented on Apr 17, 2026

    @oech3
    Contributor

    We don't need to complie nix if it was completely removed. But it is very far.

  12. xtqqczze commented on Apr 17, 2026

    @xtqqczze
    Collaborator

    Rust will only compile crates features that are enabled, so I think continuing to use the signal feature would be fine.

  13. oech3 commented on May 16, 2026

    @oech3
    Contributor

    if it would be useful to move some of the nix usage over to rustix for the windows support

    How to support Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions