Android: Rodent IV as a second opponent, with its characters and famous players
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

The play sheet chooses Maia or Rodent IV, and Rodent's character in a full-screen
list (docs/design/android-rodent.md, docs/decisions.md «Rodent IV на телефоне»).
The engine is built from its authors' sources by androidApp/scripts/rodent4.sh
(patches: no wordexp.h on bionic; the search thread took its parameter by reference,
which clang builds read after it was gone) and ships in both APKs; the opening books
are one checked download. Rodent's tables, its book manifest and its opponent loop
move from the desktop into crates/play, shared by both apps; uci's EngineConfig takes
an environment (RODENT4HOME).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-27 03:03:02 +03:00
parent 3dac4a185b
commit b3774d1651
42 changed files with 4098 additions and 951 deletions

View file

@ -81,6 +81,9 @@ pub struct EngineConfig {
/// Added to the engine's nice value on Unix (0 = as the app): a phone keeps its
/// interface smooth while the engine thinks. Every thread of the engine has it.
pub nice: i32,
/// Variables added to the engine's environment (Rodent IV on Android finds its
/// personalities and books by `RODENT4HOME`).
pub env: Vec<(OsString, OsString)>,
}
impl EngineConfig {
@ -91,6 +94,7 @@ impl EngineConfig {
working_dir: None,
timeouts: Timeouts::default(),
nice: 0,
env: Vec::new(),
}
}
}
@ -389,6 +393,7 @@ fn spawn_impl(cfg: EngineConfig, waker: Waker) -> Result<EngineHandle, EngineErr
let mut command = Command::new(&path);
command
.args(&cfg.args)
.envs(cfg.env.iter().map(|(k, v)| (k, v)))
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::piped());