pipewire-native-tools

Crates.iopipewire-native-tools
lib.rspipewire-native-tools
version0.1.3
created_at2025-09-09 18:18:46.022004+00
updated_at2025-09-20 22:49:59.520028+00
descriptionPipeWire utilities built with the pipewire-native library
homepage
repositoryhttps://gitlab.freedesktop.org/pipewire/pipewire-native-rs
max_upload_size
id1831364
size100,913
Arun Raghavan (ford-prefect)

documentation

README

pipewire-native-rs

This is a native implementation of the PipeWire client library in Rust. The primary objective is to provide a safe, idiomatic API for PipeWire clients, with a secondary goal of providing a C wrapper for clients in other languages to benefit from the safety guarantees in the longer term.

Currently, support for connecting to a PipeWire server, enumerating objects, and creating server-side objects is supported. Further work is required for sending and receiving audio/video.

Being a work-in-progress, the API will likely change as we iterate.

Also included is pw-browse, a TUI tool to interact with PipeWire. This is also under development, and will gain features as we make improvements to the library.

Documentation

Crate documentation can be found on docs.rs.

Issues

Issues and suggestions for improvements can be submitted on the freedesktop.org Gitlab.

Code structure

At the top-level, we have a native implementation implementation of the PipeWire native protocol. This is then exposed via the API in pipewire/, the entry point for this crate.

Similar to the C version, the spa/ crate implements low-level primitives for the PipeWire library.

There is a native implementation for some primitives, such as pod, for data serialisation/deserialisation. There are also associated traits and macros (in macros/) to reduce boilerplate.

A hybrid strategy is used for SPA plugins (which provide basic features such as logging, event loops and a system call API). The SPA interfaces are exposed as Rust interfaces, for use by Rust code. The underlying implementations use the C plugin under the hood, with the option to be replaced by a Rust implementation in the future if desired.

Related Work

This project and draws inspiration from other efforts like the current Rust bindings in pipewire-rs and the pipewire-native-protocol implementation. The goal is for these bindings to eventually be the official PipeWire Rust API.

Commit count: 0

cargo fmt