Skip to content

zvuk/kithara

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
kithara

crates.io docs.rs License

kithara

Open-source modular audio engine in Rust. Contributions and reviews are welcome.

Status: active development. Public APIs are intended to remain stable within a release line, while internal implementation may evolve. Pin exact versions for production use.

Modular audio engine in Rust. Streams, decodes, and plays audio from progressive HTTP and HLS sources with a persistent on-disk cache. Designed as an open-source alternative to AVPlayer with DJ-grade mixing — multi-slot playback, crossfading, and per-channel EQ.

Components are independent crates: use one standalone, or compose them into a full player.

Features

  • Player engine — AVPlayer-style API with multi-slot playback, crossfading, and per-channel EQ (kithara-play)
  • Progressive HTTP — stream MP3, AAC, FLAC, and ALAC with disk caching and pull-driven range fetches
  • HLS VOD — adaptive bitrate, variant switching, cross-codec recreate, AES-128-CBC encrypted segments, on-disk segment cache
  • Multi-backend decode — Symphonia (software, cross-platform), Apple AudioToolbox (macOS/iOS), Android MediaCodec (Android)
  • Audio pipeline — sample-rate conversion via rubato, effects chain, OS-thread worker with backpressure
  • Persistent disk cache — lease/pin semantics, LRU eviction, crash-safe writes
  • Zero-allocation hot paths — sharded buffer pool for decode and I/O loops
  • WASM — browser playback bindings with shared-memory threading (kithara-ffi web module)

Quick Start

cargo install just --locked
cargo build --workspace
just test-all

Full environment setup, lint commands, and mobile (Android / Apple) build flows live in CONTRIBUTING.md.

Demo Players

# Native demo — auto-picks TUI or GUI for the terminal
cargo run -p kithara-app -- --mode auto <TRACK_URL_1> <TRACK_URL_2>
cargo run -p kithara-app -- --mode tui <TRACK_URL_1> <TRACK_URL_2>
cargo run -p kithara-app -- --mode gui <TRACK_URL_1> <TRACK_URL_2>

# WASM browser demo (via kithara-ffi)
cd crates/kithara-ffi
RUSTUP_TOOLCHAIN=nightly trunk serve --config Trunk.toml --port 8080

Architecture

A layered workspace of independent crates, from the public player API down to storage and platform primitives. See ARCHITECTURE.md for the dependency graph, crate map, and data flow. Each crate also has its own README.md.

Contributing

See CONTRIBUTING.md for development setup and .docs/workflow/rust-ai.md for the local-first task flow.

Minimum Supported Rust Version (MSRV)

The current MSRV is 1.89 (Rust edition 2024), tracked via rust-version in the workspace Cargo.toml. It may be bumped in pre-release alphas without a major version bump.

License

Licensed under either of Apache-2.0 or MIT at your option.

About

Modular Rust audio engine for progressive HTTP and HLS (VOD): transport primitives, PCM decoding, persistent disk cache, and reusable components for desktop and WASM players.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors