Skip to main content

Crate whisker_cli

Crate whisker_cli 

Source
Expand description

Whisker CLI implementation.

§Subcommands

  • doctor — environment / toolchain health check (Rust targets, Android NDK/SDK/JDK, Xcode).
  • runwhisker run: build → install → launch → file-watch + hot-patch loop. Thin wrapper around whisker_dev_server::DevServer; the cli’s job is to resolve the user crate’s whisker.rs (via manifest + probe) and project the resulting Config into the dev-server’s flat whisker_dev_server::Config.
  • new / new-module — scaffolding.

No build subcommand: production builds happen through the same xcodebuild / gradle assembleRelease invocations CI uses. Past revisions shipped a whisker build convenience wrapper, but it existed mostly to manage the ~/.cache/whisker/lynx/ user cache, which is itself gone now (iOS uses SPM remote binary targets, Android pulls aars from Maven).

§Internal binaries

In addition to the user-facing whisker binary, the package also produces two shim binaries used during the initial fat build to capture the rustc + linker invocations that Tier 1 hot-patch will replay later:

  • whisker-rustc-shim (-Cstrip=… / -Csave-temps=y style wrapper around rustc) — captures argv to $WHISKER_RUSTC_CACHE_DIR/<crate>-<timestamp>.json.
  • whisker-linker-shim (forwarded by rustc’s -C linker=…) — captures argv to $WHISKER_LINKER_CACHE_DIR/<output>-…json.

Modules§

build_dispatch
Internal build-tool dispatch — the entry points the generated native projects invoke to cross-compile the user’s Rust crate into the platform artifact (iOS WhiskerDriver.framework / Android lib*.so) and to discover Whisker modules.
doctor
whisker doctor — environment health check.
linker_shim
whisker-linker-shim-C linker=<shim> target.
manifest
Resolve a user crate’s whisker.rs config + Cargo.toml metadata into a ResolvedManifest the CLI can hand to whisker-dev-server.
new_app
whisker new <name> — scaffold a new Whisker app crate.
new_module
whisker new-module <name> — scaffold a Whisker module crate.
platforms
Glue between whisker-cng and the CLI.
probe
Run a tiny probe binary that includes the user’s whisker.rs and emits the resulting Config as JSON on stdout.
run
whisker run — start the dev server.
rustc_shim
whisker-rustc-shim binary’s logic.
tui
Inline-viewport TUI for whisker run.

Functions§

run