A Zero-Split-Brain implementation of lunar awareness.
The Moon Oracle is a mathematically precise moon phase tracker. It exists to provide a true "Write Once, Run Everywhere" business logic layer using WebAssembly (WASM), ensuring that the lunar context is consistent across all platforms—from Android devices to cloud gateways.
The cardinal rule of this architecture is that Host Environments are ignorant. The hosts (Android, Go, Python, etc.) do not know how to calculate a moon phase. They only handle I/O and pass primitive data to the WASM "Brain."
If a bug is found in the lunar calculation, it is fixed in exactly one place: the Rust WASM source in the brain/ directory.
brain/: The core logic written in Rust, compiled to WASM.android/: The Moon Oracle mobile application, built with Jetpack Compose. The only host so far.docs/: Detailed architectural blueprints, including the hosts that are still to be built.
- Rust with
wasm32-wasip1target. - Android Studio (Koala or newer).
- JDK 17+.
cd brain
cargo test
cargo build --target wasm32-wasip1 --release
# Copy the binary to the Android assets
cp target/wasm32-wasip1/release/moon_phase_brain.wasm ../android/app/src/main/assets/moon-phase.wasm- Open the root directory in Android Studio.
- Sync Gradle.
- Run the
appmodule on an emulator or physical device.
- Phase 1 ✅ Shipped: the Rust WASM Brain and the Android app, with a launcher icon that follows the moon.
- 0.1.0 📝 TODO: true-moon phase timing using real orbital correction terms (#10). Today the Brain uses the mean lunar month, so phase changes can be several hours early or late.
- Phase 2 📝 TODO: Iron Town Gateway (Spin API) and Terminal Interface (Go CLI).
- Phase 3 📝 TODO: AI Bridge (MCP Server) and K8s Reconciler.
- Phase 4 📝 TODO: Smooth animations and deeper OS integration.
- Someday 📝 TODO: latitude/longitude inputs for hemisphere-correct orientation, moonrise/moonset, and sunrise/sunset.
See docs/MOON_PHASE_ARCHITECTURE.md for what each piece is and which parts exist.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Status: Brain and Android host shipped; other hosts TODO | Architecture: Zero-Split-Brain