Files
notescraft/specs/mobile-and-sync/portability.md
T
Marcos Paulo a71e294566
ci / ci (macos-latest) (push) Has been cancelled
ci / ci (ubuntu-latest) (push) Has been cancelled
ci / ci (windows-latest) (push) Has been cancelled
docs: specs, designs, research and agent rules for mobile, sync and collaboration
- specs: mobile-and-sync, collaboration, vault-launcher, e2ee, attachments-and-history, capture-and-publish, agents (brief and orchestrator notes for MiniMax and GLM agents)
- research: sync landscape, security and server, mobile platform (browsed, cited)
- design/mobile: 24 PaperCraft exports (dark and light) of the phone, desktop, sharing and launcher screens
- .claude: project skills and path rules so delegated agents follow the repo rules; CLAUDE.md imports AGENTS.md
- ARCHITECTURE and ROADMAP updated; AGENTS.md lists the approved sync dependencies

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 07:46:30 -03:00

2.5 KiB

Mobile portability report (2026-10-20)

Checked on this Mac with rustup target add aarch64-linux-android and cargo check --target aarch64-linux-android -p <crate> (type-check only; no linker, no NDK).

Crate Android check
sync, collab, markdown, vault, index, blocks, templates, calendar, themes, i18n, editor ok
engine, ui-egui stop at the ring build script (pulled in by ureq with rustls): it compiles C and needs the Android NDK's clang. Not a code problem; expected to pass with ANDROID_NDK_HOME set and cargo-ndk. Not verified beyond that point.

So the core (vault, Markdown, index, sync, OT, editor model) is already portable. What is still unverified: engine and ui-egui past ring, and everything iOS (no Xcode here).

What this machine lacks (blocks the real shells)

  • Android: no SDK, no NDK, no cargo-ndk, no adb, no emulator. Needs Android Studio (or command-line tools), NDK r26+, cargo install cargo-ndk, targets aarch64-linux-android (added) and x86_64-linux-android for the emulator.
  • iOS: only the Command Line Tools are installed, not Xcode (xcodebuild and simctl fail). Needs Xcode, the targets aarch64-apple-ios and aarch64-apple-ios-sim, and an Apple developer account for devices.
  • Windows target x86_64-pc-windows-msvc is installed (cross check only).

Desktop-only code to gate before a mobile build (from the code audit)

apps/notescraft (main.rs, desktop.rs, audio.rs with cpal, menu.rs with muda, notify.rs, keychain.rs, net.rs, google.rs, launcher_window.rs which spawns processes), rfd file dialogs, notify watcher on iOS (own container only: poll instead), every Command::new user: crates/git, crates/acp, crates/syntax/src/fetch.rs, crates/engine/src/calendar/clock.rs, crates/engine/src/vault/pdf_preview.rs, ui-egui perf.rs, os_scale.rs, video.rs, player.rs. Plan: cfg(not(any(target_os = "android", target_os = "ios"))) on those features; commands report "not available on this device" through enabled.

Next steps once the toolchains exist

  1. cargo ndk -t arm64-v8a check -p notescraft-engine -p notescraft-ui-egui and fix what shows.
  2. apps/notescraft-mobile with eframe + android-activity (GameActivity), a Gradle project, one screen (the launcher) running on an emulator.
  3. iOS static library + Xcode project, simulator first.
  4. Soft keyboard and IME spike in the Source editor (see research/mobile-platform.md finding on egui IME).