pipewire-native 0.1.0

A Rust implementation of the PipeWire client library
Documentation

This library provides a Rust-native API to the PipeWire audio server. This includes a native implementation of the protocol, and FFI wrappers around the lower-level SPA libraries used by PipeWire itself (which we try not to expose in the public API).

Usage

A typical client would use the following steps:

  • Create a MainLoop, and run it
  • Configure and create a Context, optionally specifying client-specific configuration
  • Connect to the server, which provides a Core
  • Request a Registry via the core
  • Listen for global events
  • Bind to the global objects you wish to interact with
  • For each object you bind to, you will get a proxy object which has methods you can call on the object, as well as events you can subscribe to with an add_listener() call.

Examples

Example usage of the library can be found in the source repository. The simple client test in tests/lib.rs is a good starting point. The pw-browse utility in tools/browse can also serve as a guide for writing clients.