Expand description
§RAUC for Rust ✨
Async Rust bindings for the RAUC D-Bus installer API, built with zbus.
Installation · Usage · Examples · API docs · Contributing
§Compatibility
| Component | Support |
|---|---|
| Platform | Linux |
| Connection | System bus |
| Interface | de.pengutronix.rauc.Installer |
| RAUC | RAUC_VERSION |
| Rust | 1.89+ |
| zbus | 6.x |
§Installation
cargo add rauc§Usage
Connect to the system bus and query slot status:
use rauc::InstallerProxy;
use zbus::{Connection, Result};
#[tokio::main]
async fn main() -> Result<()> {
let connection = Connection::system().await?;
let proxy = InstallerProxy::new(&connection).await?;
let slots = proxy.get_slot_status().await?;
println!("{slots:#?}");
Ok(())
}See the API documentation for all available methods and types.
§Examples
§Inspect and monitor
# Each read-only example is named after its RAUC operation
cargo run --example get_slot_status
# Bundle inspection takes a path or URL
cargo run --example inspect_bundle -- path/to/update.raucb
# Receives installation progress changes
cargo run --example receive_progress_changed
# Receives the installation-completed signal
cargo run --example receive_completed§Modify the system
[!CAUTION] Installing bundles and marking slots modify the target system.
# Marks a slot as good, bad, or active
cargo run --example mark -- good booted
# Installs a specified bundle
cargo run --example install_bundle -- path/to/update.raucb§Initial interface generation
The initial bindings were generated from RAUC’s official installer interface for the release in RAUC_VERSION:
mkdir -p src/generated
RAUC_VERSION=$(cat RAUC_VERSION)
RAUC_INTERFACE=de.pengutronix.rauc.Installer.xml
curl -L "https://raw.githubusercontent.com/rauc/rauc/${RAUC_VERSION}/src/${RAUC_INTERFACE}" -o "interfaces/${RAUC_INTERFACE}"
zbus-xmlgen file "interfaces/${RAUC_INTERFACE}" -o src/generated/installer.rs[!NOTE] This records the original setup, not an ongoing maintenance workflow.
§Contributing
Bug fixes, features, tests, and documentation improvements are welcome. See the contribution guidelines to get started.
§License
Licensed under the MIT License or Apache License 2.0, at your option.
The committed RAUC interface XML is licensed under CC0-1.0.
Structs§
- Artifact
Status Artifact Info - Status of an artifact stored in a repository.
- Artifact
Status Info - Status of a configured artifact repository.
- Artifact
Status Instance Info - Status of one artifact instance.
- GetSlot
Status Info - Status and metadata of a RAUC slot.
- Inspect
Bundle Args - Options for inspecting a local or remote bundle.
- Inspect
Bundle Bundle Info - Bundle format and integrity metadata.
- Inspect
Bundle Handler Info - Custom handler metadata from a bundle manifest.
- Inspect
Bundle Hooks Info - Hook metadata from a bundle manifest.
- Inspect
Bundle Image Info - Metadata for an image contained in a bundle.
- Inspect
Bundle Info - Metadata read from an inspected bundle.
- Inspect
Bundle Update Info - Update metadata from a bundle manifest.
- Install
Bundle Args - Options for installing a local or remote bundle.
- Installer
Proxy - Mark
Info - Result of marking a slot as good, bad, or active.
- Progress
- Progress of the current installation operation.
Enums§
- Bundle
Format - Format used to package a RAUC bundle.
- Installation
Result - Result reported by the installation completion signal.
- Mark
State - Action used to mark a slot.
- Operation
- Operation currently performed by RAUC.
- Slot
Boot Status - Bootloader status of a slot.
- Slot
Identifier - Slot selector accepted by the mark operation.
- Slot
Installation Status - Result of the most recent installation to a slot.
- Slot
State - Runtime state of a slot.
Type Aliases§
- Slot
Name - Name identifying a RAUC slot, such as
rootfs.0.