Valdi Jetpack is a small playground that ships a handful of Compose-style primitives (compose_core) and a sample Valdi app (compose_playground) to exercise them. It targets the Valdi runtime (https://github.com/snapchat/valdi) and is meant to be a lightweight starting point for experimenting and iterating on Valdi UI patterns.
- macOS with Xcode command line tools for the macOS/iOS targets.
- Bazel (bazelisk recommended) and the Valdi toolchains fetched via the workspace
http_archiverules. - For Android:
ANDROID_NDK_HOMEandANDROID_HOMEset to your installed SDK/NDK paths.
- Install dependencies and run the macOS playground:
bazel run //apps/compose_playground:app_macos \
--snap_flavor=platform_development \
--@valdi//bzl/valdi:assets_mode=inline \
--repo_env=VALDI_PLATFORM_DEPENDENCIES=macos
# Equivalent: valdi install macos --application //apps/compose_playground:app_macos- Build just the Valdi module:
bazel build //valdi_modules/compose_core:compose_core- Smoke the placeholder test (expand as needed):
bazel test //valdi_modules/compose_core:compose_core_placeholder_testapps/compose_playground/: Valdi app entry withroot_component_path = ComposePlaygroundApp@compose_playground/src/ComposePlaygroundApp.valdi_modules/compose_core/: Compose-like Row/Column/Box/Spacer, Text/Image/Card, LazyRow/LazyColumn primitives.scripts/: helper scripts;log_progress.shshould be run after meaningful changes.docs/: parity matrix, notes, and progress log.
root_component_pathmust use the<Component>@<valdi_module>/src/...format so the Valdi module loader resolves bundled assets (repository-relative paths will fail at runtime).- When consuming
compose_core, import fromcompose_core/src/indexto match the generated.valdimodulecontents. - TypeScript is strict via
_configs/base.tsconfig.json; keep exports surfaced throughsrc/index.tsfiles.
- Android builds will fail without a configured SDK/NDK (
ANDROID_NDK_HOME,ANDROID_HOME). - If Bazel reports permission issues in
/var/tmp/_bazel_*, ensure your user owns that directory or set--output_user_rootto a writable path. - Runtime "No item named ..." errors usually mean the
root_component_pathor import path does not match the bundled module name; verify the two notes above.
- Follow the logging workflow in
AGENTS.md(scripts/log_progress.sh "note"after meaningful work). - Keep changes small and Bazel targets green; prefer
bazel run //apps/compose_playground:app_macos ...for end-to-end validation when editing UI.
