Skip to main content

Module build_dispatch

Module build_dispatch 

Source
Expand description

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.

These used to be a separate whisker-build binary. Folding them into the whisker CLI (which already links whisker-build as a library) means cargo install whisker-cli is the only install needed — there is no second binary to put on PATH.

Invocation shape (hidden subcommands, not for humans):

# Xcode Run Script Phase (gen/ios/.../project.pbxproj):
whisker build-ios \
    --workspace="$WORKSPACE" --package="$PKG" \
    --configuration="$CONFIGURATION" --platform="$PLATFORM_NAME" \
    --archs="$ARCHS" --built-products-dir="$BUILT_PRODUCTS_DIR"

# Gradle cargoBuild task (whisker-gradle-plugin):
whisker build-android \
    --workspace="$WS" --package="$PKG" --profile=debug \
    --abi=arm64-v8a --jni-libs-dir="$DIR" --min-sdk=24

# Gradle Settings plugin module discovery → JSON on stdout:
whisker modules --workspace="$WS" --package="$PKG"

Structs§

AndroidArgs
Inputs the Gradle cargoBuild* task passes through.
IosArgs
Inputs the Xcode Run Script Phase passes through. Mirrors the Xcode environment variables verbatim so the script glue stays one shell line.
ModulesArgs
Inputs for the modules discovery subcommand. Workspace + app crate name are enough — the JSON carries per-platform availability flags inline.

Functions§

run_android
run_ios
run_modules