diff --git a/.azure/install-rust.yml b/.azure/install-rust.yml index 28b291d8c..9e66d4e33 100644 --- a/.azure/install-rust.yml +++ b/.azure/install-rust.yml @@ -44,6 +44,7 @@ steps: rustup update --no-self-update $RUST_TOOLCHAIN rustup default $RUST_TOOLCHAIN rustup target add x86_64-unknown-linux-musl + rustup target add wasm32-wasi if [ -n "$ANDROID" ]; then rustup target add x86_64-linux-android --toolchain $RUST_TOOLCHAIN diff --git a/Makefile b/Makefile index a357cdf50..360439c71 100644 --- a/Makefile +++ b/Makefile @@ -211,7 +211,7 @@ check-bench: check-bench-singlepass check-bench-llvm # to https://github.com/rust-lang/cargo/issues/6745 . NOT_RUNTIME_CRATES = -p wasmer-clif-backend -p wasmer-singlepass-backend -p wasmer-middleware-common -p wasmer-runtime-core -p wasmer-emscripten -p wasmer-llvm-backend -p wasmer-wasi -p wasmer-kernel-loader -p wasmer-interface-types RUNTIME_CHECK = cargo check --manifest-path lib/runtime/Cargo.toml --no-default-features -check: check-bench +check: check-bench check-kernel-net cargo check $(NOT_RUNTIME_CRATES) cargo check --release $(NOT_RUNTIME_CRATES) cargo check --all-features $(NOT_RUNTIME_CRATES) @@ -263,6 +263,8 @@ check: check-bench --features=llvm,default-backend-llvm --features=default-backend-singlepass,singlepass,cranelift,llvm,cache,deterministic-execution +check-kernel-net: cargo +nightly check -p kernel-net --target=wasm32-wasi + # Release release: cargo build --release --features backend-singlepass,backend-cranelift,backend-llvm,loader-kernel,experimental-io-devices,log/release_max_level_off diff --git a/lib/kernel-net/src/lib.rs b/lib/kernel-net/src/lib.rs index cc6f91820..bfedbd5a9 100644 --- a/lib/kernel-net/src/lib.rs +++ b/lib/kernel-net/src/lib.rs @@ -59,13 +59,13 @@ thread_local! { #[derive(Default)] struct AsyncState { - callback: Option>, + callback: Option>, _epoll: Option>, } pub struct Epoll { fd: i32, - imm_queue: Mutex>>, + imm_queue: Mutex>>, } impl Epoll { @@ -163,7 +163,7 @@ fn get_async_io_payload< direction: EpollDirection, poll_action: P, on_ready: F, -) -> Box { +) -> Box { __get_async_io_payload(epoll, fd, direction, poll_action, on_ready, false) } @@ -178,7 +178,7 @@ fn __get_async_io_payload< mut poll_action: P, on_ready: F, registered: bool, -) -> Box { +) -> Box { let epfd = epoll.fd; Box::new(move || { //println!("async io payload"); @@ -230,7 +230,7 @@ struct SockaddrIn { } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Default, Copy, Clone)] struct InAddr { s_addr: u32, }