Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ jobs:
- name: Strict workspace Clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

- name: Strict PipeWire-only Clippy
run: cargo clippy -p pocketstation --lib --locked --no-default-features --features pipewire-capture -- -D warnings

- name: Cross-document public facade on the configured docs.rs target
run: cargo doc --locked --no-deps -p pocketstation --no-default-features --target x86_64-unknown-linux-gnu

- name: Verify capture-only dependencies exclude Opus
run: |
if cargo tree --locked -e normal -p pocketstation \
--no-default-features --features native-capture --prefix none | \
grep -E '^(opus|audiopus_sys) v'; then
grep -E '^(opus|audiopus_sys|opusic-sys) v'; then
echo "capture-only builds must not include Opus" >&2
exit 1
fi
Expand Down Expand Up @@ -84,6 +87,7 @@ jobs:
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: 1.95.0
components: clippy

- name: Install Python 3.13
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
Expand All @@ -100,5 +104,19 @@ jobs:
ninja --version
cargo check --release --locked -p pocketstation

- name: Link the default debug library
if: runner.os == 'Windows'
env:
CMAKE_GENERATOR: Ninja
run: cargo build --locked -p pocketstation

- name: Link the capture-only debug library without Opus
run: cargo build --locked -p pocketstation --no-default-features --features native-capture

- name: Strict Core Audio-only Clippy
if: runner.os == 'macOS'
run: cargo clippy -p pocketstation --lib --locked --no-default-features --features coreaudio-capture -- -D warnings

- name: Strict WASAPI-only Clippy
if: runner.os == 'Windows'
run: cargo clippy -p pocketstation --lib --locked --no-default-features --features wasapi-capture -- -D warnings
20 changes: 19 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,17 @@ jobs:
- name: Strict workspace Clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

- name: Strict PipeWire-only Clippy
run: cargo clippy -p pocketstation --lib --locked --no-default-features --features pipewire-capture -- -D warnings

- name: Cross-document public facade on the configured docs.rs target
run: cargo doc --locked --no-deps -p pocketstation --no-default-features --target x86_64-unknown-linux-gnu

- name: Verify capture-only dependencies exclude Opus
run: |
if cargo tree --locked -e normal -p pocketstation \
--no-default-features --features native-capture --prefix none | \
grep -E '^(opus|audiopus_sys) v'; then
grep -E '^(opus|audiopus_sys|opusic-sys) v'; then
echo "capture-only builds must not include Opus" >&2
exit 1
fi
Expand Down Expand Up @@ -164,6 +167,7 @@ jobs:
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: 1.95.0
components: clippy

- name: Install Python 3.13
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
Expand All @@ -180,9 +184,23 @@ jobs:
ninja --version
cargo check --release --locked -p pocketstation

- name: Link the default debug library
if: runner.os == 'Windows'
env:
CMAKE_GENERATOR: Ninja
run: cargo build --locked -p pocketstation

- name: Link the capture-only debug library without Opus
run: cargo build --locked -p pocketstation --no-default-features --features native-capture

- name: Strict Core Audio-only Clippy
if: runner.os == 'macOS'
run: cargo clippy -p pocketstation --lib --locked --no-default-features --features coreaudio-capture -- -D warnings

- name: Strict WASAPI-only Clippy
if: runner.os == 'Windows'
run: cargo clippy -p pocketstation --lib --locked --no-default-features --features wasapi-capture -- -D warnings

publish:
if: >-
(
Expand Down
28 changes: 13 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pocketstation"
version = "1.1.9"
version = "1.1.10"
edition = "2021"
rust-version = "1.95.0"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -60,14 +60,21 @@ crate-type = ["rlib", "cdylib", "staticlib"]
[features]
default = ["native-capture", "opus-codec"]
native-capture = [
"dep:cpal",
"dep:pipewire",
"dep:alsa",
"dep:libc",
"coreaudio-capture",
"wasapi-capture",
"pipewire-capture",
"alsa-fallback",
]
native-capture-runtime = []
coreaudio-capture = ["native-capture-runtime", "dep:cpal"]
wasapi-capture = [
"native-capture-runtime",
"dep:wasapi",
"dep:windows",
"dep:windows-core",
]
pipewire-capture = ["native-capture-runtime", "dep:pipewire", "dep:libc"]
alsa-fallback = ["native-capture-runtime", "dep:alsa", "dep:libc"]
opus-codec = ["dep:opus"]
conformance-fixtures = []
internal-testing = []
Expand All @@ -80,7 +87,7 @@ thiserror = "1"
hound = "3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
opus = { version = "0.3", optional = true }
opus = { version = "0.4", optional = true }
tokio = { version = "1", features = ["macros", "rt", "sync", "time"] }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You need Rust 1.95 or newer and one supported desktop application producing
audio.

```bash
cargo add pocketstation@1.1.9
cargo add pocketstation@1.1.10
```

```rust,no_run
Expand Down Expand Up @@ -209,7 +209,7 @@ Native prerequisites:
Disable native capture when a tool only needs PocketStation types or docs:

```toml
pocketstation = { version = "1.1.9", default-features = false }
pocketstation = { version = "1.1.10", default-features = false }
```

## Continue from the task you have
Expand Down
21 changes: 21 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ This page covers user-visible changes in the PocketStation 1.x release line.

## Unreleased

## 1.1.10 — 2026-09-04

Windows applications can now use PocketStation's default features in debug
builds. The Opus dependency uses the current libopus bindings, which link the
same Microsoft C runtime as the Rust application.

Applications that already own part of the host audio stack can select only the
PocketStation driver they need:

```toml
pocketstation = {
version = "1.1.10",
default-features = false,
features = ["pipewire-capture"]
}
```

The available driver features are `coreaudio-capture`, `wasapi-capture`,
`pipewire-capture`, and `alsa-fallback`. The normal `native-capture` feature
still enables all drivers for the current platform.

## 1.1.9 — 2026-09-04

Capture the complete desktop output mix through the same Session API used for
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fn main() {
#[cfg(target_os = "macos")]
{
if std::env::var_os("CARGO_FEATURE_NATIVE_CAPTURE").is_some() {
if std::env::var_os("CARGO_FEATURE_COREAUDIO_CAPTURE").is_some() {
build_macos_capture_bridge();
}
if std::env::var_os("CARGO_FEATURE_MACOS_ASP_DRIVER_ARTIFACT").is_some() {
Expand Down
18 changes: 17 additions & 1 deletion docs/compatibility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@ The default feature set includes desktop capture and the Opus codec. A native
application that only captures PCM can omit the codec and its native library:

```toml
pocketstation = { version = "1.1.9", default-features = false, features = ["native-capture"] }
pocketstation = { version = "1.1.10", default-features = false, features = ["native-capture"] }
```

Use the `opus-codec` feature when the application calls the Rust Opus API or
links the C Opus functions declared in `pocketstation.h`.

An application that already owns part of the host audio stack can select one
PocketStation driver directly. For example, a Linux application that already
links an incompatible ALSA crate can enable only PipeWire:

```toml
pocketstation = {
version = "1.1.10",
default-features = false,
features = ["pipewire-capture"]
}
```

The corresponding macOS and Windows features are `coreaudio-capture` and
`wasapi-capture`. Use the normal `native-capture` feature when PocketStation
should select the platform driver and include the Linux `snd-aloop` fallback.

Use the repository checks before changing a public API or protocol:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/rust-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Native build requirements:
## Add PocketStation

```bash
cargo add pocketstation@1.1.9
cargo add pocketstation@1.1.10
```

## Capture in three lines
Expand Down
29 changes: 14 additions & 15 deletions examples/operator-consumer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 13 additions & 15 deletions examples/whisper-transcribe/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading