livesplit-core is written in Rust, but ships a C-compatible API (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LiveSplit/livesplit-core/llms.txt
Use this file to discover all available pages before exploring further.
livesplit-core-capi) that
serves as a universal bridge to every other supported language. All language bindings are
auto-generated by the capi/bind_gen tool: it parses the Rust C API source with syn,
derives the full type and function graph, and writes idiomatic wrapper classes into
capi/bindings/.
Available bindings
| Language | Mechanism | Use Case |
|---|---|---|
| Rust | Direct (native) | Any Rust project |
| C / C++ | Header file | Native applications |
| C# | P/Invoke | .NET / Unity |
| Java | JNA or JNI | Android, desktop Java |
| Kotlin | JNI | Android, Kotlin desktop |
| Swift | C interop | iOS, macOS |
| JavaScript | Node.js FFI | Server-side JS |
| TypeScript | Node.js FFI | Server-side TS |
| WebAssembly | wasm-bindgen | Web browsers |
| Ruby | FFI gem | Ruby scripts |
| Python | ctypes | Python scripts |
How bindings are structured
Every binding follows the same shape:- Three tiers per type —
TimerRef(shared borrow),TimerRefMut(mutable borrow), andTimer(owned). The owned class is the only one responsible for freeing memory. - Owned objects must be explicitly freed. Each owned class exposes a
drop/Dispose/[Symbol.dispose]method (language-specific). Forgetting to call it leaks native memory. - Static constructors map to language-level constructors or factory methods (e.g.
Run_new→new Run()in Java,new Run()in C#,Run_new()in C).
How to obtain bindings
Option 1 — Pre-built releases
Download the native library and the binding source files from the GitHub Releases page. Every release includes a.zip per target platform containing the shared/static library and all
language-specific binding files.
Option 2 — Generate from source
Clone the repository, then run the binding generator:capi/bindings/:
Binding pages
C / C++
Opaque pointer API via a C header. Works directly in C++ with the LiveSplit namespace.
C#
P/Invoke wrappers. Each type implements
IDisposable for safe cleanup in .NET and Unity.Java / Kotlin
JNA for desktop Java and JNI for Android. Kotlin bindings use JNI exclusively.
Swift
C interop via a module map. Integrates with Xcode and Swift Package Manager.
JavaScript / WebAssembly
Node.js FFI binding and a wasm-bindgen WebAssembly module for browsers.
Ruby / Python
Ruby FFI gem and Python ctypes wrappers around the native C library.