zlink 0.9 is out: a Rust implementation of the Varlink IPC protocol. A program no longer needs an async runtime of its own to use it, and a service can restart under systemd without dropping its clients.
What's new:
• zruntime is the default runtime rather than Tokio, and each runtime has a `block_on` that drives it on the calling thread.
• A service is now a struct that derives `Service` and holds its interfaces, each a type with `#[interface]` on its `impl` block.
• `Server::run_until` stops a server gracefully, between method calls, and returns its listener, service and connections.
• With the `handover` feature, on Linux, a service hands its connections over to its next instance, through zoter and systemd's file descriptor store.
• The `byte_stream` module of each runtime runs a connection over a TLS stream, a WebSocket or any other byte stream.
What breaks:
• Tokio support is off by default: enable the `tokio` feature to keep using `zlink::tokio`.
• `WriteHalf::write` returns the number of bytes it wrote, and the new `write_all` writes the whole buffer.
• `Socket` has a new required method, `join`, the opposite of `split`.
The `service` attribute macro keeps working but is deprecated in favor of `Service` derive and `interface` attribute macro, and the release notes list every breaking change.
Release notes: https://github.com/z-galaxy/zlink/releases/tag/zlink-0.9.0
Book: https://z-galaxy.github.io/zlink/
Crate: https://crates.io/crates/zlink