rust_rocket/lib.rs
1//! This crate implements a client library and a player for the [rocket sync tracker](https://github.com/rocket/rocket).
2//! You can connect to a rocket tracker, get values from tracks, and live-edit your production.
3//!
4//! **There are two alternative APIs in this crate:**
5//!
6//! ## Simple API
7//!
8//! See the [`simple`] module. Requires enabling the `simple` feature.
9//! Handles both editing and release playback use cases using conditional compilation.
10//!
11//! ## Low-level API
12//!
13//! The [`client`] module contains the types which you need to connect to a Rocket tracker and edit your production.
14//!
15//! The [`player`] module contains a player which you can use when building your production in release mode.
16//!
17//! # Features
18//!
19//! | Feature | Purpose |
20//! | --- | --- |
21//! | `serde` | Derive [serde](https://crates.io/crates/serde)'s traits on the [`Track`]-type |
22//! | `bincode` | Derive [bincode](https://crates.io/crates/bincode)'s traits on the [`Track`]-type |
23//! | `simple` | Enables the [`simple`] API |
24//! | `player` | Builds the [`simple`] API in file player mode instead of client mode |
25//!
26//! All features are mutually compatible, but if you choose to use `bincode` as your serialization library,
27//! you don't need to use `serde`.
28//!
29//! The `simple` feature enables `bincode`.
30
31pub mod client;
32pub mod interpolation;
33pub mod player;
34pub mod simple;
35pub mod track;
36
37pub use client::RocketClient;
38pub use player::RocketPlayer;
39pub use track::Track;
40
41/// Produced by [`RocketClient::save_tracks`] and consumed by [`RocketPlayer::new`]
42pub type Tracks = Vec<Track>;