Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
68bd558
feat: move ffi code under optional ffi feature
bakayu May 19, 2026
f4986b5
wip: proxy code generated via `zbus-xmlgen`
bakayu May 19, 2026
8d372e4
feat: add config, events, media and proxy types
bakayu May 20, 2026
2a27e0e
feat: implement the zbus backend
bakayu May 23, 2026
7a1f09e
ops: update ci to test all features
bakayu May 23, 2026
5dc81b6
clippy: fix warnings
bakayu May 23, 2026
78d4636
chore: fix broken doc links
bakayu May 23, 2026
c07dc81
chore: add missing_docs and clippy fixes
bakayu Jun 1, 2026
afb331b
feat: add keep_alive for client
bakayu Jun 1, 2026
768d21d
rustfmt: fix formatting
bakayu Jun 1, 2026
3ed5b54
chore: cleanup merge artifacts
bakayu Jun 1, 2026
234256a
chore: update README and CHANGELOG
bakayu Jun 1, 2026
55014a6
Merge branch 'main' into zbus-backend
bakayu Jun 1, 2026
95728ec
wip: move ffi features to workspace
bakayu Jun 7, 2026
5571259
chore: rename examples to be axiomatic
bakayu Jun 7, 2026
734925b
feat: zbus-backend hardening
bakayu Jun 7, 2026
6bd71eb
fix(cargo-deny): specify cpdb-sys version under deps
bakayu Jun 7, 2026
00bc0c7
chore: cleanup
bakayu Jun 13, 2026
4f1a09f
fix: put zbus-backend tags to fix ffi only build
bakayu Jun 13, 2026
a11ac94
chore: update Cargo.toml for release
bakayu Jun 13, 2026
277a8ae
ops: add different build and test scenarios
bakayu Jun 13, 2026
842d9a6
chore: rename zbus_test example
bakayu Jun 13, 2026
95832bc
Merge branch 'main' into zbus-backend
bakayu Jun 13, 2026
fc069e4
cargofmt: fix formatting issues
bakayu Jun 13, 2026
fe8b13b
chore: fix readme link and add LICENSE to cpdb-sys
bakayu Jun 13, 2026
e685cb3
ops: update release to handle cpdb-sys
bakayu Jun 13, 2026
af57e12
ops: skip release if version not updated in Cargo.toml
bakayu Jun 14, 2026
11074c6
chore: add readme, homepage and docs tag
bakayu Jun 14, 2026
ac7b5b4
feat: add log::debug for making debugging easier
bakayu Jun 14, 2026
91b0fe1
feat: use PrinterState enum instead of String in PrinterSnapshot
bakayu Jun 19, 2026
79676be
feat: add global and per printer structure to config
bakayu Jun 19, 2026
5c5d6f9
fix: fix the printer return type
bakayu Jun 20, 2026
4d60df1
feat: update the example to use a real printer
bakayu Jun 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Build (all targets)
run: cargo build --all-targets --verbose
run: cargo build --all-targets --all-features --verbose

Comment thread
TitikshaBansal marked this conversation as resolved.
- name: Clippy
run: cargo clippy --all-targets -- -D warnings

- name: Run tests
- name: Run unit tests
env:
LD_LIBRARY_PATH: /usr/lib:/usr/local/lib
run: cargo test --all --verbose -- --nocapture
run: cargo test --all-targets --all-features --verbose

- name: D-Bus smoke test (ignored integration tests)
env:
Expand All @@ -72,7 +72,7 @@ jobs:
run: dbus-launch --exit-with-session cargo test --test integration -- --ignored --nocapture

- name: Build examples
run: cargo build --examples --verbose
run: cargo build --examples --all-features --verbose

docs:
name: Documentation
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Docs
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps -p cpdb-rs
run: cargo doc --no-deps -p cpdb-rs --all-features

audit:
name: Security audit
Expand Down Expand Up @@ -195,4 +195,6 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Build Rust library (bindgen + compile, no link)
run: cargo build --lib --verbose
run: cargo build --lib --all-features --verbose


8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `CpdbClient`: The new main entrypoint for the async native D-Bus client.
- `CpdbClient::get_all_printers`: Fetches a snapshot of all active printers across all discovered backends.
- `CpdbClient::get_printer_details`: Fetches options and media sizes for a specific printer.
- `CpdbClient::discovery_stream`: Exposes a native `Stream` of `DiscoveryEvent`s (`PrinterAdded`, `PrinterRemoved`, `PrinterStateChanged`) for live discovery.
- `CpdbClient::keep_alive_all`: Helper method to ping all connected backends and prevent them from auto-exiting due to inactivity timeouts.
- `Frontend::new_with_observer<F: FnMut(&Printer, PrinterUpdate) + Send + 'static>` —
closure-based registration for the `cpdb_printer_callback`. Backed by a
process-global pointer-keyed registry and unregistered automatically when
Expand Down Expand Up @@ -101,6 +106,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Infrastructure

- Native Rust D-Bus Client: Completely rewrote the crate to use native Rust D-Bus bindings via `zbus`, dropping the dependency on the `cpdb-libs` C library for the primary API.
- Async API: All frontend APIs are now fully asynchronous and powered by `tokio`.
- Legacy FFI: The old C-FFI bindings are still available but have been moved behind the optional `ffi` feature flag.
- `build.rs` now prefers `pkg-config` over the hard-coded fallback path
list, drops the architecture-specific `/usr/lib/x86_64-linux-gnu` guess,
and emits a `cargo:warning` when neither pkg-config nor `CPDB_LIBS_PATH`
Expand Down
Loading
Loading