Use rsix to make system calls in Wasmtime. (#3355)
* Use rsix to make system calls in Wasmtime. `rsix` is a system call wrapper crate that we use in `wasi-common`, which can provide the following advantages in the rest of Wasmtime: - It eliminates some `unsafe` blocks in Wasmtime's code. There's still an `unsafe` block in the library, but this way, the `unsafe` is factored out and clearly scoped. - And, it makes error handling more consistent, factoring out code for checking return values and `io::Error::last_os_error()`, and code that does `errno::set_errno(0)`. This doesn't cover *all* system calls; `rsix` doesn't implement signal-handling APIs, and this doesn't cover calls made through `std` or crates like `userfaultfd`, `rand`, and `region`.
This commit is contained in:
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@@ -163,6 +163,7 @@ jobs:
|
||||
- run: |
|
||||
rustup target add wasm32-unknown-emscripten
|
||||
rustup target add armv7-unknown-linux-gnueabihf
|
||||
sudo apt-get install -y gcc-arm-linux-gnueabihf
|
||||
- run: cargo check --target wasm32-unknown-emscripten -p wasi-common
|
||||
- run: cargo check --target armv7-unknown-linux-gnueabihf -p wasi-common
|
||||
|
||||
|
||||
Reference in New Issue
Block a user