Make wasi-common-std-sync's dependency on system-interface private. (#4784)

* Make wasi-common-std-sync's dependency on system-interface private.

Change some `pub` functions which exposed system-interface types to be
non-`pub`.

And, change `from_sysif_fdflags` functions to `get_fd_flags` functions
that take `impl AsFilelike` arguments instead of system-interface types.

With these changes, system-interface is no longer exposed in the
public API.

* Add a public API for `is_read_write` too.

Implementors using types implementing `AsFilelike` may want to use the
same `is_read_write` logic, without explicitly depending on
system-interface, so provide a function that provides that.
This commit is contained in:
Dan Gohman
2022-08-26 11:39:00 -07:00
committed by GitHub
parent c1f9736938
commit a68fa86aad
3 changed files with 69 additions and 20 deletions

View File

@@ -31,6 +31,7 @@ rustix = { version = "0.35.6", features = ["fs"] }
[target.'cfg(windows)'.dependencies]
once_cell = "1.12.0"
io-extras = "0.15.0"
rustix = { version = "0.35.6", features = ["net"] }
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.36.0"