livesplit-core is a library that provides a lot of functionality for creating a speedrun timer. It can be used directly from Rust. Additional bindings are available for the following programming languages:
- C
- C++
- C#
- Java with Java Native Access or Java Native Interface
- Kotlin with Java Native Interface
- Swift
- Ruby
- Python
- JavaScript + TypeScript for Node.js and WebAssembly
The documentation is available here:
- LiveSplit One Web
- LiveSplit One Desktop Prototype
- LiveSplit One OBS Plugin
- chronos Terminal Timer
- annelid
You can install Rust with the installer available on rustup.rs. Clone the repository and build the library with the following command:
cargo build --release -p livesplit-core-capiThe library will then be available as a shared and static library in the
target folder. If you only want to build the library as a shared or static
library, not both, you can run either one of the following commands:
# Shared Library
cargo rustc --release -p livesplit-core-capi --crate-type cdylib
# Static Library
cargo rustc --release -p livesplit-core-capi --crate-type staticlibIf you want to build the bindings for the library too, you need to go into the
capi/bind_gen folder and run the following command:
cargo runThe bindings will then be available in capi/bindings.
The C API can also be built as a smaller subset. High-level features such as
parsing, timing, run-editing, and layouts select coherent parts of the
API, while features named after individual API types allow more precise
control. For example, a library that only parses and inspects split files can
be built with:
cargo rustc --profile max-opt -p livesplit-core-capi --crate-type cdylib \
--no-default-features --features parsingThe binding generator needs to receive the same feature selection so that it only generates bindings for functions that are present in the library:
cd capi/bind_gen
cargo run -- --no-default-features --features parsingBuilds for a lot of common platforms are available in the Releases.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.