Skip to content

Commit 301d430

Browse files
authored
Update windows-sys, async-std and hermet versions. (#76)
* Update windows-sys, async-std and hermet versions. * Update wasi target name.
1 parent 72f2ce9 commit 301d430

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,5 @@ jobs:
178178
toolchain: ${{ matrix.rust }}
179179
- run: >
180180
rustup target add
181-
wasm32-wasi
182-
- run: cargo check --workspace --release -vv --target=wasm32-wasi
181+
wasm32-wasip1
182+
- run: cargo check --workspace --release -vv --target=wasm32-wasip1

Cargo.toml

+9-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rust-version = "1.63"
2121
os_pipe = { version = "1.0.0", features = ["io_safety"], optional = true }
2222

2323
# Optionally depend on async-std just to provide impls for its types.
24-
async-std = { version = "1.12.0", optional = true }
24+
async-std = { version = "1.13.0", optional = true, features = ["io_safety"] }
2525
# Optionally depend on tokio to implement traits for its types.
2626
tokio = { version = "1.6.0", features = ["io-std", "fs", "net", "process"], optional = true }
2727
# Optionally depend on socket2 to implement traits for its types.
@@ -30,13 +30,13 @@ socket2 = { version = "0.5.0", optional = true }
3030
mio = { version = "0.8.0", features = ["net", "os-ext"], optional = true }
3131

3232
[target.'cfg(target_os = "hermit")'.dependencies]
33-
hermit-abi = { version = "0.3", optional = true }
33+
hermit-abi = { version = ">=0.3, <=0.4", optional = true }
3434

3535
[target.'cfg(not(windows))'.dependencies]
3636
libc = { version = "0.2.96", optional = true }
3737

3838
[target.'cfg(windows)'.dependencies.windows-sys]
39-
version = "0.52.0"
39+
version = ">=0.52, <=0.59"
4040
optional = true
4141
features = [
4242
"Win32_Foundation",
@@ -48,8 +48,13 @@ features = [
4848

4949
[package.metadata.docs.rs]
5050
features = ["close"]
51-
rustdoc-args = ["--cfg", "doc_cfg"]
5251

5352
[features]
5453
default = []
5554
close = ["libc", "hermit-abi", "windows-sys"]
55+
56+
[lints.rust.unexpected_cfgs]
57+
level = "warn"
58+
check-cfg = [
59+
'cfg(wasi_ext)',
60+
]

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#![cfg_attr(all(wasi_ext, target_os = "wasi"), feature(wasi_ext))]
3333
// Currently supported platforms.
3434
#![cfg(any(unix, windows, target_os = "wasi", target_os = "hermit"))]
35-
#![cfg_attr(doc_cfg, feature(doc_cfg))]
35+
#![cfg_attr(docsrs, feature(doc_cfg))]
3636

3737
mod portability;
3838
mod traits;
@@ -133,7 +133,7 @@ pub use portability::{
133133
};
134134

135135
#[cfg(feature = "close")]
136-
#[cfg_attr(doc_cfg, doc(cfg(feature = "close")))]
136+
#[cfg_attr(docsrs, doc(cfg(feature = "close")))]
137137
pub mod example_ffi;
138138
pub mod raw;
139139
pub mod views;

src/views.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -236,22 +236,22 @@ unsafe impl FilelikeViewType for os_pipe::PipeReader {}
236236
unsafe impl SocketlikeViewType for socket2::Socket {}
237237

238238
#[cfg(not(any(target_os = "wasi", target_os = "hermit")))]
239-
#[cfg(feature = "async_std")]
239+
#[cfg(feature = "async-std")]
240240
unsafe impl SocketlikeViewType for async_std::net::TcpStream {}
241241
#[cfg(not(any(target_os = "wasi", target_os = "hermit")))]
242-
#[cfg(feature = "async_std")]
242+
#[cfg(feature = "async-std")]
243243
unsafe impl SocketlikeViewType for async_std::net::TcpListener {}
244244
#[cfg(not(any(target_os = "wasi", target_os = "hermit")))]
245-
#[cfg(feature = "async_std")]
245+
#[cfg(feature = "async-std")]
246246
unsafe impl SocketlikeViewType for async_std::net::UdpSocket {}
247247
#[cfg(unix)]
248-
#[cfg(feature = "async_std")]
248+
#[cfg(feature = "async-std")]
249249
unsafe impl SocketlikeViewType for async_std::os::unix::net::UnixStream {}
250250
#[cfg(unix)]
251-
#[cfg(feature = "async_std")]
251+
#[cfg(feature = "async-std")]
252252
unsafe impl SocketlikeViewType for async_std::os::unix::net::UnixListener {}
253253
#[cfg(unix)]
254-
#[cfg(feature = "async_std")]
254+
#[cfg(feature = "async-std")]
255255
unsafe impl SocketlikeViewType for async_std::os::unix::net::UnixDatagram {}
256256

257257
#[cfg(feature = "mio")]

0 commit comments

Comments
 (0)