Skip to content

feat: configurable iOS jetsam memory limits#81

Open
cjchanh wants to merge 1 commit intoevilsocket:mainfrom
cjchanh:feat/configurable-jetsam
Open

feat: configurable iOS jetsam memory limits#81
cjchanh wants to merge 1 commit intoevilsocket:mainfrom
cjchanh:feat/configurable-jetsam

Conversation

@cjchanh
Copy link
Copy Markdown

@cjchanh cjchanh commented Apr 13, 2026

What changed

  • make iPhone/iPad worker layer budgeting configurable via CAKE_MOBILE_LAYER_BUDGET_MB and CAKE_MOBILE_RESERVE_PCT
  • keep existing Apple desktop unified-memory behavior unchanged
  • add mobile library / KMP bridge hooks so the shared app can set those values before starting a worker
  • add a focused sharding test for the default iPad/iPhone path

Why

Cake currently hardcodes a 1536 MiB mobile layer budget. That is safe as a default, but it makes the iOS worker memory policy inflexible for devices and deployment modes that can safely use a different budget.

This change keeps the current defaults intact and only adds configuration for the iPhone/iPad path.

Impact

  • default behavior is unchanged
  • iOS worker hosts can opt into higher or lower budgets without patching Cake core
  • the mobile app can pass those settings through the existing shared worker startup flow

Validation

  • RUSTC_WRAPPER="" cargo test -p cake-core --lib --test unit
  • RUSTC_WRAPPER="" cargo clippy -p cake-core -p cake-cli --features metal -- -D warnings
  • RUSTC_WRAPPER="" cargo build --release --features metal
  • shared KMP compile: :shared:compileKotlinMetadata, :shared:compileKotlinIosArm64, :shared:compileKotlinIosSimulatorArm64

Notes

  • Android shared-module compilation was not run in this clean worktree because the local Android SDK path is not configured there.
  • scripts/deploy-ios.sh and broader mobile telemetry/UI work were intentionally left out of this PR.

@cjchanh cjchanh marked this pull request as ready for review April 13, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant