# Product code lives here; reusable UI belongs in `iris/`. [package] name = "ai-app" version = "0.1.0" edition = "2024" # Android loads the cdylib; desktop, examples, and tests link the rlib. [lib] name = "ai_app" crate-type = ["cdylib", "rlib"] [[bin]] name = "ai-app-desktop" path = "src/bin_desktop.rs" required-features = ["screens"] [[example]] name = "transcript" required-features = ["screens"] [[example]] name = "phone" required-features = ["fixture"] [dependencies] event-model = { path = "../event-model" } serde = { version = "1", features = ["derive"] } # Transcript lines must retain exact float values and raw JSON bytes. serde_json = { version = "1", features = ["float_roundtrip", "raw_value"] } ureq = { version = "3", features = ["json"] } pulldown-cmark = "0.13.4" base64 = "0.23" log = { version = "0.4.34", features = ["std"] } # Optional so the Compose shell does not link the renderer. iris = { path = "../iris", optional = true } tabs-ui = { path = "../iris/tabs-ui", optional = true } jni = { version = "0.22", optional = true } libc = { version = "0.2.189", optional = true } tokio = { version = "1.53.1", features = ["rt", "time"], optional = true } [target.'cfg(not(target_os = "android"))'.dependencies] winit = "0.30.13" # Keep this pin synchronized with `iris/Cargo.toml`. [target.'cfg(target_os = "android")'.dependencies] android-view = { git = "https://github.com/rust-mobile/android-view.git", rev = "bec6c62a96cef8239b0fd7fedeef9b184d02e3a1" } android_logger = "0.15.1" [features] default = ["screens", "fixture"] screens = ["dep:iris"] # Default-on for tests; APK builds opt in so ordinary APKs omit the 1.9 MB fixture. fixture = ["screens"] transcript-screen = ["screens"] tabs-screen = ["screens", "dep:tabs-ui"] bench = ["transcript-screen", "fixture", "dep:libc", "dep:tokio"] shell = ["dep:jni"] force-gles = ["screens", "iris/force-gles"] [dev-dependencies] tempfile = "3" tokio = { version = "1.53.1", features = ["rt", "time"] } # APK builds select these profiles explicitly. [profile.android-release] inherits = "release" panic = "abort" strip = true lto = "fat" codegen-units = 1 # A warm-fling profile measured p90/p99 0.09/0.26 ms at 3 versus # 0.15/0.42 ms at "s"; the 1.9 MB saving is not worth that frame cost. opt-level = 3 [profile.android-dev] inherits = "dev" panic = "abort" # Full DWARF in each renderer-linked test binary writes tens of gigabytes. [profile.dev] debug = "line-tables-only" [profile.test] debug = "line-tables-only" [[test]] name = "catch_a_fling" required-features = ["fixture"] [[test]] name = "fence_fling" required-features = ["fixture"] [[test]] name = "gesture_cancel" required-features = ["fixture"] [[test]] name = "input_log_roundtrip" required-features = ["fixture"] [[test]] name = "phone_screen" required-features = ["fixture"] [[test]] name = "top_edge" required-features = ["fixture"]