# RustAudio/cpal

Low-level cross-platform audio I/O library in Rust

Repository: https://github.com/RustAudio/cpal
Canonical: https://ross.abutalabs.com/products/cpal
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, audio, sound
Last push: 2026-08-23T21:03:50+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 100
- inputs: {"age_days": 4283, "days_push": 10, "days_rel": 17, "gap_med": 0, "n_releases_24m": 90}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3913, forks 535 (observed 2026-08-28T04:08:28.878145+00:00)

## What it is
CPAL is a low-level cross-platform audio input/output library written in Rust. It provides device enumeration, stream configuration, and building input/output streams across many platforms and backends.

## Use cases
- capture microphone input in a Rust application
- play raw audio samples to speakers
- enumerate audio devices and their supported configurations
- build a low-latency audio stream with ASIO or JACK
- record system audio on macOS via loopback
- run audio I/O in the browser via Web Audio API

## When to choose
- you need direct, low-level control over audio devices and streams in Rust
- you need cross-platform audio I/O including mobile and WebAssembly
- you need low-latency playback or capture with optional ASIO/JACK backends

## When to avoid
- you just want simple high-level playback of audio files - use Rodio instead
- you need audio processing, mixing, or DSP features - cpal only handles I/O
- you are not working in Rust

## Facets
- artifact type: library
- maturity: stable
- function: audio-processing
- domain: cross-platform
- platform: windows, wasm, rust, cross-platform
- tags: audio-io, playback, recording, alsa, coreaudio, wasapi, jack, pipewire, low-level, audio, linux, macos, android, ios

## Member repositories
- RustAudio/cpal (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:28.878145+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:25:04.080210+00:00, confidence not recorded.
  - readme: https://github.com/RustAudio/cpal (fetched 2026-08-28T04:08:28.878145+00:00, sha 257dd8b5a505)
  - registry_crates: https://crates.io/api/v1/crates/cpal (fetched 2026-08-29T09:18:54.991930+00:00, sha 5a0a62cf0747)
- Data as of 2026-08-30T08:39:29.467469+00:00.
