Skip to content

tornade-player/tornade-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

103 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

tornade-core

Tornade Core Logo

CI License: MIT

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.

Features

  • 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

Building

Prerequisites

  • 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 test

Release build

cargo build --release

The static library (libtornade_core.a) is produced at target/release/.

Using as a Library Dependency

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" }

Project Structure

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

Related Projects

  • tornade-tui — Terminal UI frontend (MIT)
  • tornade-gui — Native GUI apps for macOS, Windows, Linux (proprietary)

Architecture

  • 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.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE for details. This permissive license allows use in proprietary applications.

About

Rust audio core library for the tornade music player

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages