- Now using the fmt subscriber for improved formatting
- Using spans on all syscalls
- Added recorded fields on the spans instead trace and debug macros
- Adding timing on all syscall
* A new TaskStatus is introduced that specifies the current state of a task
(usually a process or thread)
* Status tracking is refactored to use tokio::sync::watch instead of a
homegrown solution which combined channels and mutexes
* The task status now not just tracks an exit code, but also the ocurred error
This helps consumers of the task status to know that and error
ocurred, and which one, which helps debugging / logging and potential
recovery
* Remove the unused VBUS crate leftover types and traits
Almost all gone, except for the VirtualBusError
* Move SignalHandlerAbi types to os::signal
The implementations were previously already replaced with stub impls.
After ensuring that the current wasix modules don't actually import the
syscalls, we can now safely remove all the plumbing, including:
* syscalls
* types
- Removed generation_arena which was causing some serious leakages of files and sockets
- Added OsError for NetworkErrors so that "Too Many Open Files" is properly passed
- Local networking will now cap at 10 sockets in the backlog
- Added the missing shutdown error code
- Removed the inodes lock around most of the WASI syscalls
- Fixed some race conditions in the event notifications for WASI
- The polling loop will now only notify a closed socket once
- Event notifications now uses Wakers rather than MPSC
- Some socket errors now return the right codes which prevents panics in WASM
- Fixed a bug where the file read and write guards might release the file before the lock
- The inode seed is now much safer preventing overlaps
- The fd seed is now much safer preventing overlaps
- Closing files is now implicit rather than explicit reducing possibliities for error
- Forking of file descriptors is now much simplier
- Polling events will now be returned in random order to prevent some race conditions
- Removed a number of memory allocations which were wasting memory and performance
- Sockets now only copy the send and recv data once rather than multiple times
* Move wasmer bindings from wasi-types to wasi crate
It makes much more sense to only have the host bindings in the wasi crate.
Otherwise it comlicates feature gating for JS.
* Change module initialization to only initialize wasix_http bindings if
the module requires them.
* Patch up bindings to return a Box<dyn FnOnce> initializer.
Initial step towards implementing wasix http client support for Wasm
instances using WAI generated bindings.
Adds a "wasix_http_client_v1.wai" schema for http clients.
Extends the wasi-types type generator to also generate Wasmer host
bindings for the wasix_http_client_v1 bindings.
These are written to wasi-types/src/wasix.
Some custom fixup of the bindings is needed.
Also adds a patch to Cargo.toml that forces wai-bindgen-wasmer to use
the repo-local wasmer crate.
Also adds generation of Rust client bindings.
Replace the lib/wasi-types/regenerate.sh shell script with a Rust
implementation.
We already had some Rust fixup code in lib/wasi-types/wasi-types-generator-extra.
This mostly just converts the "wai-bindgen" CLI invokation into Rust
code that uses the wai-bindgen crates as a dependency.
Also moves the .wit files from "wit-clean" to ./schema/wasi and uses the
.wai extension.
The ./schema dir will also hold Wasix-specific definitions in the future.
ARM has different alignment requirements, making the struct larger.
This might not actually work properly, because the struct inside the Wasm
instance will probably have the wrong size.
Need to fix this by doing better de/serialization, or by removing the u128
from the data!