Rust-powered native backend for the reeln CLI — media processing, overlay rendering, and game state via libav* bindings
Project description
reeln-core
Shared Rust core library for reeln — the sports highlight rendering CLI. Provides native media processing, overlay rendering, game state management, and sport-specific logic consumed by the Python CLI, OBS plugin, and future Tauri desktop app.
License: AGPL-3.0-only | Homepage: https://streamn.dad | Org: StreamnDad
Architecture
reeln-core (Rust workspace)
├── reeln-media Media processing via libav* (probe, render, concat, xfade, composite, extract)
├── reeln-overlay 2D overlay template engine (tiny-skia + cosmic-text → PNG)
├── reeln-sport Sport registry & segment naming
├── reeln-state Game state machine, JSON persistence, directory management
├── reeln-config XDG configuration, env overrides, validation
├── reeln-plugin Hook system, capabilities, dynamic plugin loading
├── reeln-python PyO3 bindings → published as `reeln-native` on PyPI
└── reeln-ffi C ABI (cdylib + staticlib) for OBS plugin integration
Crate Details
| Crate | Tests | Key Dependencies | Purpose |
|---|---|---|---|
reeln-media |
150 | ffmpeg-next 8 |
Probe, render, concat, xfade, composite, frame extract |
reeln-overlay |
156 | tiny-skia, cosmic-text, image |
Template-to-PNG rasterization |
reeln-sport |
38 | serde |
Sport aliases, segment naming |
reeln-state |
35 | serde_json, chrono, uuid, glob |
Game state CRUD, directory ops |
reeln-config |
61 | dirs, serde_json |
Config loading, merge, env overrides |
reeln-plugin |
107 | libloading |
Hook emission, plugin discovery |
reeln-ffi |
37 | All reeln-* crates |
C ABI exports |
reeln-python |
— | pyo3 0.24 |
Python extension module |
| Total | 584 |
Prerequisites
Rust toolchain:
rustup update stable
libav* development libraries (the ffmpeg command-line binary is not required at runtime):
# macOS
brew install ffmpeg pkg-config
# Ubuntu/Debian
sudo apt-get install -y libavcodec-dev libavformat-dev libavfilter-dev \
libavutil-dev libswscale-dev libswresample-dev pkg-config
# Fedora
sudo dnf install ffmpeg-devel pkg-config
Building
# Build all crates
cargo build --release
# Run all tests (584 tests)
cargo test --all
# Check without building (faster)
cargo check --all
# Lint
cargo clippy --all-targets -- -D warnings
# Format
cargo fmt --all
Python Bindings
The reeln-python crate builds a native Python extension module published as reeln-native on PyPI.
# Development build (installs into active venv)
cd crates/reeln-python
pip install maturin
maturin develop --release
# Build wheel for distribution
maturin build --release
From reeln-cli:
# Install with native backend
pip install "reeln[native]"
# Or development install from source
cd /path/to/reeln-cli
make dev-install-native
Python API (reeln_native)
| Function | Module | Description |
|---|---|---|
probe(path) |
Media | Probe media file → dict with duration, fps, width, height, codec |
render(input, output, ...) |
Media | Render video with optional filters |
render_with_filters(input, output, filter_complex, ...) |
Media | Render with full filter_complex string |
concat(segments, output, ...) |
Media | Concatenate media segments |
xfade_concat(files, durations, output, ...) |
Media | Cross-fade concatenation (xfade + acrossfade) |
composite_overlay(video, overlay_png, output, ...) |
Media | Composite PNG overlay onto video |
extract_frame(input, timestamp, output) |
Media | Extract single frame as PNG |
list_sports() |
Sport | List supported sport aliases |
segment_dir_name(sport, number) |
Sport | Generate segment directory name |
segment_display_name(sport, number) |
Sport | Generate segment display name |
game_dir_name(date, home, away, number) |
State | Generate game directory name |
detect_next_game_number(base, date, home, away) |
State | Detect next double-header number |
find_unfinished_games(base_dir) |
State | Find unfinished game directories |
load_game_state(game_dir) |
State | Load game state JSON |
save_game_state(game_dir, json) |
State | Save game state JSON |
config_dir() |
Config | Default config directory path |
data_dir() |
Config | Default data directory path |
load_config(path, profile) |
Config | Load configuration as JSON |
validate_config(json) |
Config | Validate config, return warnings |
load_template(path) |
Overlay | Load overlay template JSON |
render_overlay(template, context, output) |
Overlay | Render template to PNG |
substitute_variables(text, context) |
Overlay | Substitute {{variables}} |
evaluate_visibility(condition, context) |
Overlay | Evaluate visibility condition |
list_hooks() |
Plugin | List all hook names |
load_native_plugin(path) |
Plugin | Load native plugin from .so/.dylib |
discover_plugins(dir) |
Plugin | Discover plugins in directory |
C ABI (reeln-ffi)
The reeln-ffi crate produces a C-compatible shared library for integration with C/C++ projects (e.g., OBS Studio plugins).
cargo build -p reeln-ffi --release
# Output: target/release/libreeln_ffi.{so,dylib,dll}
CI/CD
| Workflow | Trigger | What it does |
|---|---|---|
ci.yml |
Push/PR to main |
Format, clippy, test on Linux/macOS/Windows |
release.yml |
Tag v* |
Build wheels for 5 platforms, publish to PyPI (OIDC) |
Release targets:
x86_64-unknown-linux-gnuaarch64-unknown-linux-gnux86_64-apple-darwinaarch64-apple-darwin(Apple Silicon)x86_64-pc-windows-msvc
Consumers
| Project | How it uses reeln-core |
|---|---|
| reeln-cli | pip install "reeln[native]" — Python FFI via reeln_native |
| reeln plugins | Indirectly via reeln-cli at runtime |
| streamn-scoreboard | Subprocess calls to reeln CLI (future: link reeln-ffi) |
| reeln-tauri (planned) | Direct Rust dependency |
Versioning
- Workspace version: 0.2.2 (all crates share this version)
- reeln-cli declares
reeln-native >= 0.1.0, < 1.0as optional dependency - Changelog: CHANGELOG.md
- Semantic versioning: MAJOR.MINOR.PATCH
- Releases are tag-triggered (
v*pattern)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reeln_native-0.2.3.tar.gz.
File metadata
- Download URL: reeln_native-0.2.3.tar.gz
- Upload date:
- Size: 95.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18731ed8991554f6c93972e0295b3adb693ed8df23ecc1d3c3766b87872f858e
|
|
| MD5 |
e8dec23ef72db16a24d822e31e2f7fda
|
|
| BLAKE2b-256 |
ea9f30cf53542612e88f6be8d4bd8297e92bea5f343b9ca2fc3611e6d7c8e395
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3.tar.gz:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3.tar.gz -
Subject digest:
18731ed8991554f6c93972e0295b3adb693ed8df23ecc1d3c3766b87872f858e - Sigstore transparency entry: 1217125772
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_native-0.2.3-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: reeln_native-0.2.3-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42addf1993e1f6ee07453bb54bba8e76af94ef801652735aaac3280d5538dcf6
|
|
| MD5 |
c9aadea600daf27915e8e240226718c4
|
|
| BLAKE2b-256 |
0d23f083f434e834df9175cf994a4f881b86585397583fd7dc11c76f5a31f11e
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3-cp313-cp313-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3-cp313-cp313-manylinux_2_28_x86_64.whl -
Subject digest:
42addf1993e1f6ee07453bb54bba8e76af94ef801652735aaac3280d5538dcf6 - Sigstore transparency entry: 1217125786
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_native-0.2.3-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: reeln_native-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d41796db7fa9d5026726161f29a2e141d74f5fa4422e23268fa978505da1c2
|
|
| MD5 |
13f805ee73b869082ede67800279972c
|
|
| BLAKE2b-256 |
f46c971eaeaf6d6dd84e401f49ff1fb6676ab5392973b116e5d3186700c9ddd7
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
32d41796db7fa9d5026726161f29a2e141d74f5fa4422e23268fa978505da1c2 - Sigstore transparency entry: 1217125822
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_native-0.2.3-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: reeln_native-0.2.3-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45fdcd9913a9e62727c8a254e9964b0684797ae1146f04de2bd28022fd183059
|
|
| MD5 |
851b3034e9a1a276c0be79a7a8c1e84c
|
|
| BLAKE2b-256 |
01a34e2f3e7566106a6a6c03d8946db5bd8a133096231d3532b631b0c05632b2
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
45fdcd9913a9e62727c8a254e9964b0684797ae1146f04de2bd28022fd183059 - Sigstore transparency entry: 1217125832
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_native-0.2.3-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: reeln_native-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aa8e3c92737d3d9635aa942b5d7a7c6845042e9850260bafd7ab8c35c459692
|
|
| MD5 |
eb0892450f35f801acee85742fd675a3
|
|
| BLAKE2b-256 |
b3eaaa6c5daa8ec15ea8f5feb72df61858b3966d093a937bfe2c6e9aa8feb44c
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
3aa8e3c92737d3d9635aa942b5d7a7c6845042e9850260bafd7ab8c35c459692 - Sigstore transparency entry: 1217125798
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_native-0.2.3-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: reeln_native-0.2.3-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca74de7d0287209c7cb8953fe8e3e3bd696506a8dd913b37f687c37ec984a541
|
|
| MD5 |
d82be72457038d2883c4cae31a8f7351
|
|
| BLAKE2b-256 |
2b45f8b4d6dd3e5e8f81a292c72361e0e93b7ec241af73510feaeeb8e8ea9da6
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3-cp311-cp311-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3-cp311-cp311-manylinux_2_28_x86_64.whl -
Subject digest:
ca74de7d0287209c7cb8953fe8e3e3bd696506a8dd913b37f687c37ec984a541 - Sigstore transparency entry: 1217125842
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_native-0.2.3-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: reeln_native-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2f1ec69c8117501105450220071ac281d20847003ed88d7531b340d5993e102
|
|
| MD5 |
1c7ebfc39c1aea78b9d5cec4294834ef
|
|
| BLAKE2b-256 |
f03792874e53c6c88e85eeefc066ca3880771d9b5c5d3a13d97adcc6180543a6
|
Provenance
The following attestation bundles were made for reeln_native-0.2.3-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
release.yml on StreamnDad/reeln-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_native-0.2.3-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
e2f1ec69c8117501105450220071ac281d20847003ed88d7531b340d5993e102 - Sigstore transparency entry: 1217125813
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-core@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/StreamnDad
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a92cc4c19547c6dd7d685c2e045b99d357e1ee5 -
Trigger Event:
push
-
Statement type: