From c4ad505350290a81fa9d2651b56132934816a7a6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 12:04:26 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=93=9D=20Remove=20obsolete=20USB=20tr?= =?UTF-8?q?ansport=20note=20and=20document=20smol=20crate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README advertised an upcoming USB support transport that was never implemented and has no code anywhere in the tree. Replace the misleading "Multiple transports" bullet with accurate feature bullets, and add the zlink-smol crate, a real workspace member, to the Project Structure list. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01UGwiSzPgfKxRGRWq9CZLVV --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ad178a9..b87680f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ applications. zlink makes it easy to implement Varlink services in Rust with: - **Async-first design**: Built on async/await for efficient concurrent operations. - **Type safety**: Leverage Rust's type system with derive macros and code generation. -- **Multiple transports**: Unix domain sockets and (upcoming) USB support. +- **Unix domain sockets**: Communicate over Unix domain socket transports. +- **Runtime choice**: Use either the Tokio or smol async runtime. - **Code generation**: Generate Rust code from Varlink IDL files. ## Project Structure @@ -38,6 +39,7 @@ The zlink project consists of several subcrates: - **[`zlink-core`]**: Core no-std foundation providing essential Varlink types and traits. - **[`zlink-macros`]**: Contains the attribute and derive macros. - **[`zlink-tokio`]**: `Tokio`-based transport implementations and runtime integration. +- **[`zlink-smol`]**: `smol`-based transport implementations and runtime integration. - **[`zlink-codegen`]**: Code generation tool for creating Rust bindings from Varlink IDL files. ## Examples @@ -431,6 +433,7 @@ This project is licensed under the [MIT License][license]. [`zlink`]: https://docs.rs/zlink [`zlink-core`]: https://docs.rs/zlink-core [`zlink-tokio`]: https://docs.rs/zlink-tokio +[`zlink-smol`]: https://docs.rs/zlink-smol [`zlink-codegen`]: https://docs.rs/zlink-codegen [`zlink-macros`]: https://docs.rs/zlink-macros [`Server::run` docs]: https://docs.rs/zlink/latest/zlink/struct.Server.html#method.run From 98df733ed546d81159fd7b01e4fb29e9db658579 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 13:45:06 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=9D=20Document=20the=20resolved=20?= =?UTF-8?q?example=20in=20the=20examples=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The examples README only described varlink-inspect, even though the root README lists the resolved example too. Add a section describing what the resolved example does and how to run it. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01UGwiSzPgfKxRGRWq9CZLVV --- zlink/examples/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/zlink/examples/README.md b/zlink/examples/README.md index 2036d3e..598abdb 100644 --- a/zlink/examples/README.md +++ b/zlink/examples/README.md @@ -2,6 +2,23 @@ This directory contains examples demonstrating the usage of the zlink library. +## resolved + +A CLI tool that resolves hostnames to IP addresses using `systemd-resolved`'s Varlink service. + +### Description + +The `resolved` example demonstrates how to use the `#[proxy]` macro to generate a type-safe client +API, and how to use request pipelining to send multiple resolution requests at once. It connects to +`systemd-resolved` over its Unix domain socket and prints the resolved addresses for each hostname. + +### Usage + +```bash +# Resolve one or more hostnames +cargo run --example resolved -- example.com systemd.io +``` + ## varlink-inspect A CLI tool for inspecting Varlink services via Unix domain sockets. From 37da82bda2c51f7963f4b07fbc615fb8d4c2f2f4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 13:45:25 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=93=9D=20Drop=20incorrect=20no=5Fstd?= =?UTF-8?q?=20note=20for=20idl-parse=20feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AGENTS.md claimed the idl-parse feature requires std, but the same file's own commands build and test it with --no-default-features, and it compiles cleanly in no_std. Correct the description to reflect that it works in no_std. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01UGwiSzPgfKxRGRWq9CZLVV --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index aafa19c..7f80a56 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -71,7 +71,7 @@ This is a Rust workspace implementing an asynchronous Varlink IPC library. The a - `idl`: Support for IDL type representations. - `introspection`: Enable runtime introspection of service interfaces. -- `idl-parse`: Parse Varlink IDL files at runtime (requires `std`). +- `idl-parse`: Parse Varlink IDL at runtime (works in `no_std`). ### Development Patterns - Uses workspace-level package metadata (edition, rust-version, license, repository) From ba87bf74768e023e27935bdec9adb2e72f277c20 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 13:45:33 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=9D=20Add=20zlink-smol=20to=20the?= =?UTF-8?q?=20Core=20Architecture=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Core Architecture section listed zlink-tokio but omitted zlink-smol, a real workspace member. Add it for parity with the tokio entry. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01UGwiSzPgfKxRGRWq9CZLVV --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 7f80a56..627037e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -48,6 +48,7 @@ This is a Rust workspace implementing an asynchronous Varlink IPC library. The a - **zlink-core**: No-std foundation providing core APIs. Not used directly. - **zlink-macros**: Contains the attribute and derive macros. Not used directly. - **zlink-tokio**: Tokio runtime integration and transport implementations. Not used directly. +- **zlink-smol**: smol runtime integration and transport implementations. Not used directly. - **zlink**: Main unified API crate that re-exports appropriate subcrates based on cargo features. ### Key Components From efa638a6c33b4b6f4e12b9eb5185e5ad923660f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 14:24:31 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=9D=20Link=20to=20the=20examples?= =?UTF-8?q?=20directory=20instead=20of=20duplicating=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README had a second Examples section that re-listed the example programs and their run commands, duplicating the examples directory's own README. Replace it with a short pointer from the existing Examples section so the listing lives in a single place. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01UGwiSzPgfKxRGRWq9CZLVV --- README.md | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index b87680f..f62b263 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,9 @@ impl Calculator { > **Note**: Typically you would want to spawn the server in a separate task but that's not what we > did in the example above. Please refer to [`Server::run` docs] for the reason. +For ready-to-run examples you can execute with `cargo run`, see the [`examples`](zlink/examples) +directory. + ## Code Generation from IDL zlink-codegen can generate Rust code from Varlink interface description files: @@ -377,24 +380,6 @@ enum ProcessError { } ``` -## Examples - -The repository includes a few examples: - -- **[resolved.rs](zlink/examples/resolved.rs)**: DNS resolution using systemd-resolved's Varlink - service -- **[varlink-inspect.rs](zlink/examples/varlink-inspect.rs)**: Service introspection tool - -Run examples with: - -```bash -cargo run --example resolved -- example.com systemd.io -cargo run \ - --example varlink-inspect \ - --features idl-parse,introspection -- \ - /run/systemd/resolve/io.systemd.Resolve -``` - ## Features ### Main Features