mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-04 18:10:18 +00:00
Fix issue with kernel-net
; add it to CI
This commit is contained in:
parent
cd4706fbac
commit
4d58ae2d14
@ -44,6 +44,7 @@ steps:
|
|||||||
rustup update --no-self-update $RUST_TOOLCHAIN
|
rustup update --no-self-update $RUST_TOOLCHAIN
|
||||||
rustup default $RUST_TOOLCHAIN
|
rustup default $RUST_TOOLCHAIN
|
||||||
rustup target add x86_64-unknown-linux-musl
|
rustup target add x86_64-unknown-linux-musl
|
||||||
|
rustup target add wasm32-wasi
|
||||||
|
|
||||||
if [ -n "$ANDROID" ]; then
|
if [ -n "$ANDROID" ]; then
|
||||||
rustup target add x86_64-linux-android --toolchain $RUST_TOOLCHAIN
|
rustup target add x86_64-linux-android --toolchain $RUST_TOOLCHAIN
|
||||||
|
4
Makefile
4
Makefile
@ -211,7 +211,7 @@ check-bench: check-bench-singlepass check-bench-llvm
|
|||||||
# to https://github.com/rust-lang/cargo/issues/6745 .
|
# 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
|
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
|
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 $(NOT_RUNTIME_CRATES)
|
||||||
cargo check --release $(NOT_RUNTIME_CRATES)
|
cargo check --release $(NOT_RUNTIME_CRATES)
|
||||||
cargo check --all-features $(NOT_RUNTIME_CRATES)
|
cargo check --all-features $(NOT_RUNTIME_CRATES)
|
||||||
@ -263,6 +263,8 @@ check: check-bench
|
|||||||
--features=llvm,default-backend-llvm
|
--features=llvm,default-backend-llvm
|
||||||
--features=default-backend-singlepass,singlepass,cranelift,llvm,cache,deterministic-execution
|
--features=default-backend-singlepass,singlepass,cranelift,llvm,cache,deterministic-execution
|
||||||
|
|
||||||
|
check-kernel-net: cargo +nightly check -p kernel-net --target=wasm32-wasi
|
||||||
|
|
||||||
# Release
|
# Release
|
||||||
release:
|
release:
|
||||||
cargo build --release --features backend-singlepass,backend-cranelift,backend-llvm,loader-kernel,experimental-io-devices,log/release_max_level_off
|
cargo build --release --features backend-singlepass,backend-cranelift,backend-llvm,loader-kernel,experimental-io-devices,log/release_max_level_off
|
||||||
|
@ -59,13 +59,13 @@ thread_local! {
|
|||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct AsyncState {
|
struct AsyncState {
|
||||||
callback: Option<Box<FnOnce()>>,
|
callback: Option<Box<dyn FnOnce()>>,
|
||||||
_epoll: Option<Arc<Epoll>>,
|
_epoll: Option<Arc<Epoll>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Epoll {
|
pub struct Epoll {
|
||||||
fd: i32,
|
fd: i32,
|
||||||
imm_queue: Mutex<Vec<Box<FnOnce()>>>,
|
imm_queue: Mutex<Vec<Box<dyn FnOnce()>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Epoll {
|
impl Epoll {
|
||||||
@ -163,7 +163,7 @@ fn get_async_io_payload<
|
|||||||
direction: EpollDirection,
|
direction: EpollDirection,
|
||||||
poll_action: P,
|
poll_action: P,
|
||||||
on_ready: F,
|
on_ready: F,
|
||||||
) -> Box<FnOnce()> {
|
) -> Box<dyn FnOnce()> {
|
||||||
__get_async_io_payload(epoll, fd, direction, poll_action, on_ready, false)
|
__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,
|
mut poll_action: P,
|
||||||
on_ready: F,
|
on_ready: F,
|
||||||
registered: bool,
|
registered: bool,
|
||||||
) -> Box<FnOnce()> {
|
) -> Box<dyn FnOnce()> {
|
||||||
let epfd = epoll.fd;
|
let epfd = epoll.fd;
|
||||||
Box::new(move || {
|
Box::new(move || {
|
||||||
//println!("async io payload");
|
//println!("async io payload");
|
||||||
@ -230,7 +230,7 @@ struct SockaddrIn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Default, Copy, Clone)]
|
||||||
struct InAddr {
|
struct InAddr {
|
||||||
s_addr: u32,
|
s_addr: u32,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user