Android stage 0: the core opens databases without paths; the mobile-api bridge
chess-import opens a database from its content (PGN, zip, 7z, cbv) and a
ChessBase database from the contents of its files: Android hands over file
descriptors, not paths. The text of comments as shown moves to chess-core
(comment_display_text), so the phone and the desktop show the same.
crates/mobile-api: a thin UniFFI bridge — open a database from a descriptor, a
ChessBase folder's files, or a path (tests); game rows a page at a time; a game
as a tree of moves with positions, last-move squares, NAGs and comments. It
builds for arm64-v8a and x86_64 with cargo-ndk (NDK r30, API 31) and its Kotlin
bindings generate with `cargo run -p mobile-api --features bindgen --bin
uniffi-bindgen`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 00:43:54 +03:00
|
|
|
[package]
|
|
|
|
|
name = "mobile-api"
|
|
|
|
|
description = "The ChessPenguin core for the Android app: databases, game lists, games (UniFFI)"
|
|
|
|
|
version.workspace = true
|
|
|
|
|
edition.workspace = true
|
|
|
|
|
rust-version.workspace = true
|
|
|
|
|
license.workspace = true
|
|
|
|
|
authors.workspace = true
|
|
|
|
|
publish = false
|
|
|
|
|
|
|
|
|
|
[lib]
|
|
|
|
|
crate-type = ["cdylib", "lib"]
|
|
|
|
|
name = "mobile_api"
|
|
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
|
# Generates the Kotlin bindings from the built library (`cargo run --bin uniffi-bindgen`).
|
|
|
|
|
name = "uniffi-bindgen"
|
|
|
|
|
path = "src/bin/uniffi-bindgen.rs"
|
|
|
|
|
required-features = ["bindgen"]
|
|
|
|
|
|
|
|
|
|
[features]
|
|
|
|
|
bindgen = ["uniffi/cli"]
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
chess-core.workspace = true
|
|
|
|
|
chess-import.workspace = true
|
|
|
|
|
shakmaty.workspace = true
|
|
|
|
|
thiserror.workspace = true
|
Android stage 1: databases, games, the game viewer and the engine
androidApp/: Kotlin + Jetpack Compose over the Rust core (mobile-api, UniFFI).
- Databases: the desktop samples on the list from the first start, files added
with the system picker and read in place, rename, remove with undo.
- Games: a paged list with a search by players, event, site and date.
- Game: the green board with Merida pieces, the notation as on the desktop
(variations, comments, NAG), forks, paging games, hold-to-repeat steps,
comment arrows and squares, the check glow, Latin/figurine/local notation.
- Engine: Stockfish 19 built from the pinned source (scripts/stockfish.sh) and
run from nativeLibraryDir through the uci crate. Two builds: "full" with the
network inside, "light" downloading it on request (resume, SHA-256 check).
The time per position, lines, line preview on the board; the engine quits
when the screen goes away.
- Settings and About with the licenses.
mobile-api: game search, UCI moves and comment marks for nodes, the Analyzer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 01:40:37 +03:00
|
|
|
uci.workspace = true
|
Android stage 0: the core opens databases without paths; the mobile-api bridge
chess-import opens a database from its content (PGN, zip, 7z, cbv) and a
ChessBase database from the contents of its files: Android hands over file
descriptors, not paths. The text of comments as shown moves to chess-core
(comment_display_text), so the phone and the desktop show the same.
crates/mobile-api: a thin UniFFI bridge — open a database from a descriptor, a
ChessBase folder's files, or a path (tests); game rows a page at a time; a game
as a tree of moves with positions, last-move squares, NAGs and comments. It
builds for arm64-v8a and x86_64 with cargo-ndk (NDK r30, API 31) and its Kotlin
bindings generate with `cargo run -p mobile-api --features bindgen --bin
uniffi-bindgen`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 00:43:54 +03:00
|
|
|
uniffi = "0.32.2"
|