• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

varlink / rust
56%

Build:
DEFAULT BRANCH: master
Repo Added 19 Mar 2018 03:36PM UTC
Files 27
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • RaitoBezarius/master
  • asn-generator
  • clap_update
  • clippy
  • dependabot/cargo/bitflags-2.0.0
  • dependabot/cargo/bitflags-2.0.2
  • dependabot/cargo/bitflags-2.1.0
  • dependabot/cargo/bitflags-2.2.1
  • dependabot/cargo/bitflags-2.3.1
  • dependabot/cargo/bitflags-2.3.3
  • dependabot/cargo/bitflags-2.4.0
  • dependabot/cargo/bitflags-2.4.1
  • dependabot/cargo/bitflags-2.6.0
  • dependabot/cargo/clap_complete-4.5.60
  • dependabot/cargo/colored-3.0.0
  • dependabot/cargo/proc-macro2-1.0.103
  • dependabot/cargo/quote-1.0.42
  • dependabot/cargo/syn-2.0.10
  • dependabot/cargo/syn-2.0.108
  • dependabot/cargo/syn-2.0.110
  • dependabot/cargo/syn-2.0.13
  • dependabot/cargo/syn-2.0.15
  • dependabot/cargo/syn-2.0.16
  • dependabot/cargo/syn-2.0.27
  • dependabot/cargo/syn-2.0.28
  • dependabot/cargo/syn-2.0.29
  • dependabot/cargo/syn-2.0.3
  • dependabot/cargo/syn-2.0.31
  • dependabot/cargo/syn-2.0.32
  • dependabot/cargo/syn-2.0.37
  • dependabot/cargo/syn-2.0.38
  • dependabot/cargo/thiserror-2.0.18
  • dependabot/cargo/uds_windows-1.0.1
  • feat/generator-safe-idents
  • feat/methodcall-push-fd
  • feature/hh/async_more
  • feature/hh/async_with
  • feature/hh/features
  • feature/hh/tempdir
  • feature/introspection
  • peg
  • refs/heads/dependabot/cargo/syn-2.0.18
  • refs/tags/varlink-cli-4.5.3
  • refs/tags/varlink_generator-10.1.0
  • refs/tags/varlink_parser-4.2.0
  • remove-unix_socket-dep
  • rust-version
  • style
  • syn-2-upgrade
  • unignore-tests
  • v13

25 Jul 2026 04:39PM UTC coverage: 56.305% (+1.7%) from 54.632%
30166081117

push

github

web-flow
feat: add MethodCall::push_fd() for passing file descriptors (SCM_RIGHTS) (#149)

systemd's `sd-varlink` extends varlink with file-descriptor passing over
the
Unix socket via SCM_RIGHTS: fds are pushed before the call and
referenced from
the parameters by their push-order index. (This is not part of the core
varlink
protocol as specified on varlink.org — the push-order convention is the
de-facto
one used by systemd's services.) This crate had no client-side way to
attach
fds; this adds that, mirroring `sd_varlink_push_fd()`.

## API

```rust
let mut call = client.some_method(args);
let idx = call.push_fd(fd)?;   // -> 0, then 1, ... (push order == the index methods reference)
call.more()?;                  // or .call()/.oneway(); fds are delivered with the request
```

- `MethodCall::push_fd(fd) -> io::Result<usize>` (unix only). Dups the
fd with
`F_DUPFD_CLOEXEC` (caller keeps ownership of the original), queues it,
and
  returns its push-order index.
- On send, queued fds are delivered with the request via a single
`sendmsg()` + `SCM_RIGHTS` on the connection's socket; any bytes past
the first
  `sendmsg` are written normally through the existing writer.
- Only `AF_UNIX`-socket-backed connections support this — SCM_RIGHTS
does not
exist elsewhere. `push_fd` checks the socket family up front
(`getsockname`),
so a `tcp:` connection or a reader/writer-pair connection fails
immediately
  with `io::ErrorKind::Unsupported` rather than later at send time.

No opt-in gate (cf. systemd's
`SD_VARLINK_SERVER_ALLOW_FD_PASSING_OUTPUT`):
on the client side, calling `push_fd` is itself the explicit opt-in — no
ancillary data is ever attached unless the application pushed an fd for
that
specific call.

## Scope

Send-only. Receiving descriptors (server → client) is not implemented —
it would
require recvmsg-based reading throughout the input path, and nothing
needs it yet.
`cfg(unix)` only, matching the crate's existing platform split; `libc`
is already
a unix depe... (continued)

222 of 226 new or added lines in 2 files covered. (98.23%)

64 existing lines in 2 files now uncovered.

3045 of 5408 relevant lines covered (56.31%)

13.6 hits per line

Relevant lines Covered
Build:
Build:
5408 RELEVANT LINES 3045 COVERED LINES
13.6 HITS PER LINE
Source Files on master
  • Tree
  • List 27
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
30166081117 master feat: add MethodCall::push_fd() for passing file descriptors (SCM_RIGHTS) (#149) systemd's `sd-varlink` extends varlink with file-descriptor passing over the Unix socket via SCM_RIGHTS: fds are pushed before the call and referenced from the param... push 25 Jul 2026 04:42PM UTC web-flow github
56.31
30051844958 master feat: Expose some functions for async users who accepts the connection themselves (#147) Fixes #146. The rationale is described in commit messages but it boils down to: it's very hard to accept connections yourselves and reuse these logic. push 23 Jul 2026 11:03PM UTC web-flow github
54.63
20912542228 master fix: add --all-features to coverage and lint workflows (#144) The coverage and clippy workflows were not testing async code because they ran without --all-features. The tokio feature enables async support in the varlink crate, so without it: - Co... push 12 Jan 2026 08:26AM UTC web-flow github
54.42
20912073532 master chore: replace deprecated `tempdir` crate with `tempfile` (#142) The `tempdir` crate has been deprecated in favor of `tempfile`, which now provides all the same functionality. This migration updates varlink_generator's test dependencies to use `t... push 12 Jan 2026 08:06AM UTC web-flow github
54.42
20911859055 master build(deps): bump quote from 1.0.41 to 1.0.42 (#137) Bumps [quote](https://github.com/dtolnay/quote) from 1.0.41 to 1.0.42. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/quote/releases">quote's... push 12 Jan 2026 07:56AM UTC web-flow github
54.42
20879375911 master feat: add socket activation and bridge support for AsyncConnection (#143) ## Summary - Add `AsyncConnection::with_activate()` for systemd-style socket activation - spawns a server subprocess with `LISTEN_FDS`, `LISTEN_PID`, and `LISTEN_FDNAMES` ... push 10 Jan 2026 02:01PM UTC web-flow github
54.42
20877281246 master feat: add multi-reply support for async mode (more/continues flags) (#141) The `more` flag in requests and `continues` flag in responses were not working in async mode. This commit fixes the async code generation and client to properly support mu... push 10 Jan 2026 11:00AM UTC web-flow github
54.0
20335336910 master feat: add AsyncVarlinkService for async introspection support (#139) Add introspection support (GetInfo, GetInterfaceDescription) for async varlink services, addressing issue #138. Changes: - Add AsyncInterface trait extending AsyncConnectionHan... push 18 Dec 2025 11:26AM UTC web-flow github
53.75
18943125814 master chore: update `peg` to v0.8.5 and adjust interface parsing logic (#132) refactor `ParseInterface` function and test cases to include `full_input` parameter for improved parsing. push 30 Oct 2025 01:59PM UTC web-flow github
55.63
18656814287 master chore: update `clap` to v4.5.49 and integrate `clap_complete` (#131) (#131) refactor CLI structure to leverage updated `clap` APIs and implement shell completions generation. push 20 Oct 2025 03:25PM UTC web-flow github
55.3
See All Builds (343)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc