Skip to content

lib: export rustix too #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2022
Merged

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Jan 26, 2022

This exports our specific version of rustix. It is part of our
public API, e.g. through OwnedFd usage.

This exports our specific version of `rustix`. It is part of our
public API, e.g. through `OwnedFd` usage.
@cgwalters cgwalters merged commit 39eb9f3 into coreos:main Jan 26, 2022
@lucab lucab deleted the ups/pub-use-rustix branch January 26, 2022 13:14
@cgwalters
Copy link
Member

Hmm in theory I think we should have fixed this by using the types from https://docs.rs/io-lifetimes/latest/io_lifetimes/ which are just re-exported by rustix.

But...OTOH the consumers of this crate today are themselves going to be using rustix, and I don't think we want multiple versions of rustix in the depchain.

Perhaps what we should do actually is argue for cap-std exposing rustix (under a feature flag?)

@lucab
Copy link
Contributor Author

lucab commented Jan 26, 2022

This crate and std-cap do use different OwnedFd, see https://docs.rs/cap-std-ext/0.1.1/cap_std_ext/cmdext/trait.CapStdExtCommandExt.html#tymethod.take_fd_n.
So while cap-std may wish to re-export io-lifetimes (but I think they actually want to wait for stdlib, see bytecodealliance/cap-std#192 (comment)), it won't help here as the method above uses a different one. (That's at least my understanding, I started looking at this just this morning as the ostree-rs CI was broken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants