Skip to main content

Module platforms

Module platforms 

Source
Expand description

Glue between whisker-cng and the CLI.

Responsibilities split:

  • whisker-cng owns the pure renderer: Config + paths → files on disk. No shelling out, no environment assumptions. Pure logic so it stays unit-testable against tempdirs.
  • This module decides where the gen dirs live (always <crate_dir>/gen/{android,ios}), resolves the Whisker native runtime paths (today: <workspace>/native/{android,ios}), and handles the side-effect bits that follow a sync — running xcodegen generate after iOS regeneration so the <scheme>.xcodeproj is fresh before xcodebuild runs.

Public entry point: sync_for_target. The cli’s run and build subcommands call this before kicking off the rest of the build pipeline.

Structs§

PlatformSync
Outcome of one sync_native pass.

Functions§

sync_for_target
Run the platform-appropriate sync for target. Returns the gen directory the caller should hand to gradle / xcodebuild — useful even for the fast-path (regenerated == false) case.