Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> # Conflicts: # apps/darkroom-android/Cargo.toml # apps/darkroom-desktop/Cargo.toml # platform/dr-plat/src/lib.rs
55 lines
2.4 KiB
TOML
55 lines
2.4 KiB
TOML
[package]
|
|
name = "darkroom-android"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
|
|
# A cdylib, not a bin: Android loads the app as a shared library and calls
|
|
# `android_main` through android-activity's glue. Nothing execs a binary, so
|
|
# there is no `main` to provide.
|
|
[lib]
|
|
name = "darkroom"
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
# No backend feature to select: dr-ui picks its Slint backend from the target,
|
|
# so building for aarch64-linux-android gets android-activity automatically.
|
|
dr-ui.workspace = true
|
|
# For `account::set_data_dir`: only the platform entry point knows where Android
|
|
# lets this app keep files, and it must be set before any store is opened.
|
|
dr-sync.workspace = true
|
|
# For the panic hook, for `state::set_state_dir` and for
|
|
# `diagnostics::install`. Android has no XDG directories, so the entry point is
|
|
# the only place that knows where a crash record or a log file may be written,
|
|
# and both have to be in place before anything can fail.
|
|
dr-plat.workspace = true
|
|
# Directly, not just through dr-ui: `android_main` takes an `AndroidApp` and
|
|
# calls `slint::android::init`, both of which come from this crate. The backend
|
|
# feature comes from dr-ui's target-specific dependency.
|
|
slint.workspace = true
|
|
log.workspace = true
|
|
android_logger = "0.15"
|
|
|
|
# The launch Intent and the share sheet are Java-only surfaces — see `intents`
|
|
# — and JNI is the only way to reach them.
|
|
#
|
|
# Target-gated because the crate still has to compile on the host: it is a
|
|
# workspace member, `cargo test --workspace` builds it, and the manifest tests
|
|
# in `lib.rs` are the one part of it that runs there.
|
|
#
|
|
# 0.21 rather than the 0.22 that android-activity 0.6 uses. Both are already in
|
|
# the lock — Slint's Android backend depends on two major versions of
|
|
# android-activity and pulls both — so this adds nothing to the build either
|
|
# way, and every object here comes from a raw pointer rather than from a type
|
|
# android-activity handed over, so the two never have to agree.
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
jni = "0.21"
|
|
|
|
[features]
|
|
# Mirrors darkroom-desktop: the CPU readback path is gone since S1 landed
|
|
# zero-copy. It mattered more here than on desktop — the same wrong path with
|
|
# far less memory bandwidth to absorb it (ARCH §6.1) — but it is untested on a
|
|
# device, since S1 was verified on desktop only.
|
|
default = []
|