v0.0.20
Chaos v0.0.20 — the engine runs inside the Android app
v0.0.19 proved Chaos runs on Android as a command-line binary in
/data/local/tmp. That is not something an app can use. This release puts
it in the app, and the APK published here carries it.
Read off the running app's own screen, on an Android 34 emulator:
engine 0.0.20 on this phone: 4 threads, 2.4 GiB total,
1.6 GiB available [/proc/meminfo]
That line is produced by Rust running in the app process, calling the
same core/probe the desktop uses. It is also what will decide which model
a given phone can hold -- "a powerful phone or a simple phone" -- by
measuring the device rather than matching a list of handsets.
No jni dependency
The project has none and the APK has none. JNI's ABI is a table of
function pointers at fixed indices; exactly one entry is declared --
NewStringUTF, index 167 -- with the padding before it marked
load-bearing, because a wrong index calls a different function through a
pointer and that is neither a compile error nor a clean crash.
The library is allowed to be absent, and every APK before this one took
that path: Engine.available is false, the device line falls back to
Android's own reading, and the app carries on as a client. The .so is not
committed -- half a megabyte per ABI of build output nobody can review --
so CI builds it, and greps the finished APK to prove it is in there. A cp
that worked and a package step that dropped the file look identical from
outside, and the app is built to survive the difference silently.
Fixed
- UnsatisfiedLinkError is an Error, not an Exception. A catch (e:
Exception) would have let the app die in a static initialiser with
nothing a user could act on. - The NDK's .cmd wrapper cannot link a cdylib. rustc passes
--version-script= to control exported symbols; cmd.exe mangles
it and the link dies with--version-script=...\list"" was unexpected at this time, naming neither Rust nor the NDK. The executables in
v0.0.19 were fine because they never get that flag. - The app was telling a lie it had outgrown. The CHAOS note still read
"this phone cannot be a CORE yet -- running a model needs Chaos built
for Android, which is not done" while the engine was demonstrably
running two lines above it. Caught only by reading the screen.
Retracted
- "Nothing about this app is verified on the machine that wrote it",
which the release workflow had said in a comment since the APK first
shipped. The NDK and the SDK are both on public mirrors that were
never tried; the app has since been built AND run locally, and
running it found four defects a build never would. What stays true is
that CI builds the shipped artefact from Google's own repositories,
and that nobody has run this on a real handset.
Still not done
Loading a model file and running the token loop on the phone. The bridge
is finished; that part is not, and no note here should imply otherwise.
879 tests.