The Rust audio core library powering the tornade music player ecosystem. Handles audio playback, library management, metadata extraction, and provides FFI bindings for native UI frontends.
- High-fidelity playback — FLAC, MP3, AAC, and ALAC audio formats via symphonia + rodio
- Music library management — SQLite-backed library with fast full-text search
- Rich metadata — reads album art, track info, and tags via lofty
- Swift/C FFI — ergonomic bindings via swift-bridge for native macOS UI integration
- Queue and playlist management — shuffle, repeat, history, and M3U export
- Cross-platform — builds on Linux, macOS, and Windows
- Rust 1.75+ (edition 2024)
- On macOS: Xcode Command Line Tools (for swift-bridge header generation)
git clone https://github.com/tornade-player/tornade-core.git
cd tornade-core
cargo build
cargo testcargo build --releaseThe static library (libtornade_core.a) is produced at target/release/.
Add to your Cargo.toml:
[dependencies]
tornade-core = { git = "https://github.com/tornade-player/tornade-core", tag = "v0.3.0" }For local development with a cloned copy, use a [patch] override:
[patch."https://github.com/tornade-player/tornade-core"]
tornade-core = { path = "../tornade-core" }tornade-core/
├── src/
│ ├── lib.rs # Library exports
│ ├── ffi.rs # FFI bridge functions (Swift/C)
│ ├── db/ # SQLite database layer
│ ├── models/ # Data structures (serde-serializable)
│ ├── services/ # Business logic (playback, library, metadata)
│ └── utils/ # Utilities
├── include/ # Generated C headers (git-ignored, built by build.rs)
├── build.rs # swift-bridge code generation
└── tests/ # Integration tests
- tornade-tui — Terminal UI frontend (MIT)
- tornade-gui — Native GUI apps for macOS, Windows, Linux (proprietary)
- docs/audio-architecture.md — Why the audio engine is built the way it is: CoreAudio buffer sizing, real-time callback constraints, NAS latency handling, and sample rate strategy.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT — see LICENSE for details. This permissive license allows use in proprietary applications.