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:
@@ -30,7 +30,7 @@ wat = { version = "1.0.36", optional = true }
|
||||
wasi-common = { path = "../wasi-common", optional = true }
|
||||
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", optional = true }
|
||||
wasmtime-wasi = { path = "../wasi", optional = true }
|
||||
cap-std = { version = "0.19.0", optional = true }
|
||||
cap-std = { version = "0.19.1", optional = true }
|
||||
|
||||
[features]
|
||||
default = ['jitdump', 'wat', 'wasi', 'cache']
|
||||
|
||||
Reference in New Issue
Block a user