waterui-cli 0.4.0

Cross-platform tooling for WaterUI applications
Documentation
[package]
name = "waterui-cli"
version = "0.4.0"
edition = "2024"
authors = ["Lexo Liu"]
rust-version = "1.95"
license = "Apache-2.0 OR MIT"
readme = "README.md"
repository = "https://github.com/water-rs/cli"
homepage = "https://github.com/water-rs/cli"
description = "Cross-platform tooling for WaterUI applications"
keywords = ["ui", "framework", "rust", "gui", "water"]
categories = ["gui"]

# The only scaffold fact the CLI itself owns: the Kotlin toolchain the managed
# Android toolchain installs. Every framework-owned scaffold fact — extracted
# crate requirements and backend coordinates — lives in the root manifest's
# `[package.metadata.waterui]` and reaches a scaffolded project through the
# published `framework.json`; `build.rs` fails the build if another key lands
# in this table.
[package.metadata.waterui-scaffold]
android-kotlin-version = "2.3.21"

[[bin]]
name = "water"
path = "src/terminal/main.rs"

[dependencies]
# Windows `canonicalize` returns extended-length paths that no other tool
# reports; `dunce` gives the plain one and is `canonicalize` elsewhere.
dunce = "1.0"
cargo_metadata = "0.23.1"
# Icon and asset pipeline: reads a project's source icon (PNG/JPEG/WebP) and
# writes PNG plus the Windows ICO container. `default-formats` additionally
# pulls `image`'s AVIF *encoder* (ravif -> rav1e), which nothing here calls.
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp", "ico"] }
cargo_toml = "1.0.1"
eyre = "0.6"
color-eyre = { version = "0.6.5", features = ["issue-url"] }
include_dir = "0.7.4"
futures-util = { version = "0.3", default-features = false, features = ["std", "async-await", "io"] }
futures-lite = "2.6"
async-channel = "2.5"
async-lock = "3.4"
reflink = "0.1.3"
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
serde_json = "1.0"
schemars = { version = "1.2", features = ["derive"] }
smol = "2.0.2"
target-lexicon = "0.13.5"
thiserror = "2.0.20"
jiff = { version = "0.2", features = ["serde"] }
toml = "1.1.5"
plist = "1.10"
tracing = "0.1.44"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
semver = "1.0"
# Reads DT_NEEDED out of staged Android native libraries so packaging only
# ships libc++_shared.so when a library actually links it.
object = "0.37"
serialport = { version = "4", optional = true }
which = "8.0.6"
notify = { version = "8", default-features = false, features = ["macos_kqueue"], optional = true }

# Terminal UI dependencies
clap = { version = "4", features = ["derive"] }
clap_complete = "4"
# Only `Confirm`, `Input` and `MultiSelect` are used; the default `editor`
# (tempfile) and `password` (zeroize) prompts are not.
dialoguer = { version = "0.12", default-features = false }
indicatif = "0.18"
console = "0.16"              # ANSI escape stripping for captured cargo output
anstream = "1.0"              # Auto-detected ANSI output stream
anstyle = "1"                 # ANSI styling without manual escape codes
ctrlc = { version = "3.5", features = ["termination"] }
whoami = "2.1"
heck = "0.5"                  # Case conversion (kebab-case, snake_case, etc.)

# Asset/font downloading dependencies
dirs = "7"                    # Platform-specific directories (cache, config, etc.)
hex = "0.4"                   # Hex encoding for hashes
sha2 = "0.11"                 # SHA256 hashing
sysinfo = { version = "0.39", default-features = false, features = ["system"] } # Preview support-process discovery
# ZIP archive extraction. Every archive the CLI reads or writes — Android SDK
# packages, browser runtimes, asset catalogs — is stored or deflated, so the
# bzip2/lzma/zstd/xz/ppmd/AES codecs `default` also pulls are never reached.
zip = { version = "8.6", default-features = false, features = ["deflate"] }
roxmltree = "0.21"            # Android SDK repository XML parsing
fs_extra = "1.3"
askama = "0.16"
resvg = { version = "0.48.1", optional = true }
ttf-parser = "0.25"
ignore = "0.4"
remove_dir_all = "1.0"
# All `waterui-*` dependencies are pinned to the same `water-rs/waterui` dev
# revision: the CLI tracks APIs no crates.io release carries yet, and mixing a
# git copy of one crate with registry copies of its siblings would split
# shared types across two sources. The `version` fields are what
# `cargo publish` keeps after stripping `git`; a release therefore cannot ship
# until versions carrying those APIs publish.
waterui-assets-core = { git = "https://github.com/water-rs/waterui", rev = "b8ae00f4d44fb85f707a684ab42a63e4cb55b355", version = "0.1.0" }
waterui-assets-planner = { git = "https://github.com/water-rs/waterui", rev = "b8ae00f4d44fb85f707a684ab42a63e4cb55b355", version = "0.2.0" }
waterui-preview-protocol = { git = "https://github.com/water-rs/waterui", rev = "b8ae00f4d44fb85f707a684ab42a63e4cb55b355", version = "0.1.2" }
waterui-inspector-protocol = { git = "https://github.com/water-rs/waterui", rev = "b8ae00f4d44fb85f707a684ab42a63e4cb55b355", version = "0.1.2" }
waterui-mcp-protocol = { git = "https://github.com/water-rs/waterui", rev = "b8ae00f4d44fb85f707a684ab42a63e4cb55b355", version = "0.1.0" }
aither-core = "0.4"
aither-mcp = { version = "0.4", default-features = false, features = ["server"] }
# Decodes the base64 image payloads a `tools/call` response carries back from
# the MCP child (screenshots).
base64 = "0.23"
tempfile = "3.27"
walkdir = "2.5"
pathdiff = "0.2"
url = "2.5"
fs4 = "1.1.0"
fontcull-klippa = { version = "0.1.2", optional = true }
fontcull-write-fonts = { version = "0.44.3", optional = true }
toml_edit = { version = "=0.25.13", features = ["serde"] }
diffy = { version = "=0.5.0", default-features = false }
cargo-lock = { version = "=10.1.0", default-features = false }
rustc-demangle = "0.1"

[features]
default = ["esp32", "svg-icons", "preview"]
# ESP32 board serial-port detection and `[backends.esp32] font_ranges`
# subsetting. Without it, `water devices` lists no serial ports, board
# auto-detection is skipped (QEMU and `--device <port>` still work), and
# font subsetting is unsupported.
esp32 = ["dep:serialport", "dep:fontcull-klippa", "dep:fontcull-write-fonts"]
# SVG app-icon sources rasterized through usvg/resvg. Without it only raster
# icon sources are accepted and the bundled default icon is a PNG.
svg-icons = ["dep:resvg"]
# Preview-instance registry file watching. Without it the preview launcher
# polls the registry directory on a 100 ms interval instead.
preview = ["dep:notify"]

[target.'cfg(target_vendor = "apple")'.dependencies]
zenwave = { version = "0.6.1", default-features = false, features = ["hyper-backend", "native-tls"] }
core-graphics = "0.25"
core-foundation = "0.10"

[target.'cfg(unix)'.dependencies]
# Process-group signalling for the `water run` web dev server (SIGTERM/SIGKILL
# to the bundler tree the package manager re-execs).
nix = { version = "0.31", features = ["process", "signal", "user"] }

[target.'cfg(target_os = "macos")'.dependencies]
# `.icns` encoding for hand-assembled app bundles. Only the macOS packaging path
# builds one, and that path is itself `#[cfg(target_os = "macos")]`, so the
# dependency does not belong in a Linux or Windows build of the CLI.
icns = "0.4"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = [
    "Win32_Foundation",
    "Win32_Security",
    "Win32_Security_Authorization",
    "Win32_System_Console",
    "Win32_System_JobObjects",
    "Win32_System_Threading",
] }

[target.'cfg(not(target_vendor = "apple"))'.dependencies]
zenwave = { version = "0.6.1", default-features = false, features = ["hyper-backend", "rustls"] }

[build-dependencies]
toml = "1.1.5"

[lints.rust]
missing_docs = "warn"
missing_debug_implementations = "warn"

[lints.clippy]
all = "warn"
style = "warn"
correctness = "warn"
complexity = "warn"
suspicious = "warn"
perf = "warn"
pedantic = "warn"
nursery = "warn"
cargo = "warn"
# Every `unsafe` must state why it is sound, in a form the compiler checks.
undocumented_unsafe_blocks = "warn"
multiple_crate_versions = { level = "allow", priority = 1 }

[dev-dependencies]
fontcull-skrifa = "0.39.2"

[package.metadata.cargo-machete]
ignored = ["roxmltree", "waterui-inspector-protocol"]

# cargo-dist builds release binaries with `--profile=dist`; the profile must
# exist in the manifest or every `dist build` leg fails. This is the profile
# `dist init` generates.
[profile.dist]
inherits = "release"
lto = "thin"