Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 40 million developers.Sign up
- Extracted the guest/host boundary procedure call functionality into a new
wapccrate that can be used by other projects
- Renamed the import namespace so that guest modules now import host functions from
wasm(this means modules built for Waxosuit prior to 0.3.0 will need to be recompiled)
- Upgraded the K/V capability (Redis) to include expiring keys and improved the
getmethod to be more intuitive
- Updated the interface so that
__guest_callnow both return booleans (0=false, 1=true) indicating the success of the call. This saves the cost of an FFI call for the happy path.
This release contains a breaking change to the RPC protocol used by Waxosuit and the guest SDK to communicate.
In the first public version of Waxosuit, the RPC mechanism contained explicit
However, Waxosuit doe_not_ need object instantiation since it operates purely on an RPC principle. It does not manage or expose object lifetimes, and any data exchanged is assumed to only exist for the length of the RPC. We removed the use of
free (see the wascap documentation for details). Now, there is a series of function calls made by the guest and host that are used for robust, error-handled RPC that can be initiated either by the host or by the guest.
A nice side-effect of this protocol simplification is that now that the payloads crossing the host/guest boundary are entirely opaque, the Rust guest SDK is now more ergonomic, developer-friendly, and requires less code. Further, by making these payloads opaque, we were able to remove the
decode penalties on both sides of the FFI border, reducing the function call latency.
As mentioned, we no longer use the
Event types from wascap-codec. Both of these were wrappers around a protobuf Any type, and so the encoding or decoding of any message also included a secondary encoding of the domain-specific payload. It also bled the event-sourcing internals of the Waxosuit runtime out into the public protocol. With these envelopes gone, the RPC mechanism is not only faster, but simpler and less confusing and it paves the way for future ergonomic improvements.
Error handling has been improved. By the nature of going through to factor out the envelope types, I had a chance to go over all the various code paths and I found a number of edge cases where errors would vanish, the wasm module would
trap, and the Waxosuit host runtime's module thread would panic, essentially taking down the runtime. This has been fixed and we're now honoring the
Result<T> type everywhere in the call hierarchy, so failures should no longer be able to panic the host thread, and your code can now rely on the
Result<T> types returned by the various functions on the
CapabilitiesContext in the guest SDK.
The work of the "unwrap() hunter" is never done, but things are in a far more stable place now.