Lexis is an early release: the design still moves, so open an issue before anything large. Small fixes can go straight to a pull request.
tv/ SwiftUI app (tvOS) -> calls the core through UniFFI bindings
player/ Swift playback package -> reads bytes through the core's stream ABI
core/ Rust library -> sources, SQLite index, metadata, embeddings, recommendations
- core owns all state: the library index (SQLite), metadata from TMDB,
the embeddings and every recommendation row. The app asks, the core
answers. Its public surface is
core/src/api/; storage and queries live incore/src/index/. Sources (Plex, local files) implement the module incore/src/source/. - player knows nothing about the library: it gets a
MediaStreamIO(read, seek, size, close) and plays it.player/README.mdexplains the pipeline, HDR and audio decisions in depth. - tv is the interface:
Sources/Screens/one file per screen,Sources/Components/shared views,Sources/App/Theme.swiftthe design tokens,Sources/App/Catalog.swiftevery string in English and French.
macOS with Xcode and its tvOS component, a Rust toolchain with the tvOS targets, and xcodegen:
rustup target add aarch64-apple-tvos aarch64-apple-tvos-sim
brew install xcodegen meson ninja
cd player && bash scripts/build-ffmpeg.sh && bash scripts/build-libass.sh && cd ..
cd core && cargo build && cd ..
tv/scripts/build-core.sh
cp tv/Secrets.example.xcconfig tv/Secrets.xcconfig # add a TMDB read token
cd tv && xcodegen generate && open Lexis.xcodeprojThe FFmpeg and libass builds take a while the first time and are no-ops afterwards.
The same ones CI runs (.github/workflows/ci.yml):
cd core && cargo fmt --check && cargo clippy --locked --all-targets -- -D warnings && cargo test --locked
cd player && swift test # about ten seconds
cd player && LEXIS_REALTIME_TESTS=1 swift test # the real-time lane, a few minutes
bash tv/scripts/check-spacing.shThe app's own tests run from Xcode (scheme Lexis, a tvOS simulator), or as
CI does it with xcodebuild test.
- Simple and fast. The simplest design that is also the fastest. No abstraction for later, no helper that wraps one call. A performance claim comes with a measurement: same machine, several runs, the median.
- Comments say what the code cannot: a constraint, a non-obvious why. Never what the next line does, never history.
- Interface: spacing comes from
Theme.Space, never a literal (that is whatcheck-spacing.shenforces). Every new string goes inCatalog.swiftin both English and French. - Code is in English: identifiers, comments, commits.
- Commits and PR titles follow
Conventional Commits:
fix(player): keep the subtitle track across a seek.
By contributing you agree that your work is released under the MIT licence.