diff --git a/public/llms.txt b/public/llms.txt index 045028a..97a0968 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -1,6 +1,6 @@ # mobench -> mobench is a Rust mobile benchmarking toolkit for Android and iOS. It provides a Cargo-native CLI, SDK runtime, `#[benchmark]` macros, generated mobile runners, BrowserStack App Automate integration, stable reports, schemas, and native profiling artifacts. +> mobench is a Rust mobile benchmarking toolkit for Android and iOS. It provides the `mobench` CLI, SDK runtime, `#[benchmark]` macros, generated mobile runners, BrowserStack App Automate integration, stable reports, schemas, and native profiling artifacts. Use this file as a map for AI agents, coding assistants, and documentation readers. The canonical website is https://mobench.org and the canonical documentation site is https://docs.mobench.org. @@ -19,6 +19,27 @@ Use this file as a map for AI agents, coding assistants, and documentation reade mobench was built to benchmark intense Rust workloads in mobile environments that represent real World App users. Real users run flagship phones, mid-tier devices, low-end devices, and older 32-bit devices. mobench helps teams measure whether critical Rust workloads, including cryptography used by World ID and ProveKit, perform reliably across that device range. +## Release 0.1.44–0.1.47 + +- 0.1.44 hardened pull-request benchmarks by separating secretless preparation, trusted prebuilt-only BrowserStack execution, and isolated reporting. Untrusted PR code never runs with BrowserStack credentials or write-capable repository permissions. +- 0.1.45 added a normalized repository-relative `prepare_script`, platform-specific function lists, structured Android/iOS device arrays, and fail-closed completeness checks for every function/device pair. +- 0.1.46 added `rust_toolchain` (default `stable`) for caller preparation and typed `ffi_backend` selection: `uniffi`, `native-c-abi`, or `boltffi`. Explicit CLI/workflow selection overrides `project.ffi_backend` in `mobench.toml`, then UniFFI is the default. +- 0.1.47 added `max_completion_timeout_secs` (30-minute default, six-hour trusted maximum), one bounded timeout across iOS launch/XCUITest/polling, five-minute XCUITest heartbeats with 30-second polling, accessibility-backed completed-result transport, a 15-minute BrowserStack XCUITest idle timeout, Android native-worker PID/process detection, and structured `worker_exit` failures. Credentialed iOS and Android jobs run serially, Android still runs after an iOS failure or skip, and exact-head API checks retry transient failures five times. +- Pin the reusable workflow to `f36ea5420bdb6633a6b8e91b00522ca9d5a2a84f`, pass BrowserStack secrets explicitly, and do not use `secrets: inherit`. +- Install with `cargo install mobench`, then run the `mobench` executable directly. Release 0.1.47 does not install a `cargo-mobench` binary. + +## ProveKit integration: merged PRs 450 and 451 + +- ProveKit main integration: https://github.com/worldfnd/provekit/pull/450 +- ProveKit v1 integration: https://github.com/worldfnd/provekit/pull/451 +- Both merged integrations use a `bench-mobile` crate with `#[benchmark]` functions for complete passport age-check proving, fragmented passport age-check proving, and OPRF proving. Setup functions prepare proof state outside the measured sample; `per_iteration` recreates state for destructive proving; `black_box` retains outputs. +- `bench-mobile/scripts/generate-fixtures.sh` runs only with `MOBENCH_CI_PREPARE=1`, installs a pinned Noir toolchain, compiles the required Noir programs, and stages JSON artifacts. `build.rs` embeds those artifacts and fails if CI preparation requires one that is missing. +- `mobench.toml` selects `bench-mobile`, library `bench_mobile`, `ffi_backend = "native-c-abi"`, Android arm64 with SDK 24/34, iOS 13 with the UIKit legacy runner, 7,200-second platform timeouts, and a 10-second Android heartbeat. +- The workflows use Rust `nightly-2026-03-04`, mobench `0.1.47`, `max_completion_timeout_secs: 7200`, explicit BrowserStack secrets, exact PR number and 40-character head SHA, two measured iterations, one warmup, and three devices per platform. +- A trusted `/mobench` PR comment dispatcher accepts only OWNER, MEMBER, or COLLABORATOR commands and safely parses platform, device profile, iterations, and warmup. The workflow resolves explicit iOS and Android device arrays and groups concurrency per PR without cancelling a running benchmark. +- The reusable workflow performs secretless caller checkout, fixture generation, build, and packaging first. Credentialed jobs consume validated prebuilt bundles without checking out or executing caller code, then isolated reporting writes GitHub checks/PR output and standard `summary.json`, `summary.md`, and `results.csv` artifacts. +- PR 451 adds a BrowserStack environment preflight before invoking the reusable workflow; PR 450 invokes it directly after device resolution. Both merged files reference release commit `8a2dfbb2ba941aa6a6582bf49dae482cc87779df`; new callers should use the final reusable-workflow pin `f36ea5420bdb6633a6b8e91b00522ca9d5a2a84f` above. + ## Documentation Pages - Overview: https://docs.mobench.org/docs @@ -40,7 +61,7 @@ mobench was built to benchmark intense Rust workloads in mobile environments tha - Local devices: https://docs.mobench.org/local-devices Connected Android devices, Android Studio emulators, ADB, Xcode simulators, and connected iOS devices. - BrowserStack CI: https://docs.mobench.org/browserstack - Hosted real-device runs, matrix resolution, split-sample merging, PR reporting, artifacts, resource metrics, and CI contracts. + Hosted real-device runs, v0.1.47 reliability controls, secure reusable workflows, and the detailed ProveKit PR 450/451 integration. - App Automate setup: https://docs.mobench.org/app-automate BrowserStack App Automate API uploads, Android Espresso, iOS XCUITest, build execution, devices, pricing, and trial limits. - Profiling: https://docs.mobench.org/profiling @@ -52,11 +73,11 @@ mobench was built to benchmark intense Rust workloads in mobile environments tha - Schemas: https://docs.mobench.org/schemas CI metadata, summary JSON, trace events, fixture payloads, and machine-readable contracts. - Examples explained: https://docs.mobench.org/examples - Basic benchmark and native C ABI / FFI examples, plus how fixture outputs map to reports. + Basic and native C ABI / FFI examples plus the detailed ProveKit PR #450/#451 integration: benchmark crate, generated fixtures, mobile configuration, trusted triggers, reusable workflow, and CI reports. - Diagrams: https://docs.mobench.org/diagrams Crate architecture, lifecycle, provider flow, BrowserStack CI, profiling artifacts, and SDK versus CLI responsibility. - Current behavior: https://docs.mobench.org/current-spec - Current behavior and API contract for release 0.1.43. + Current behavior and API contract for release 0.1.47. - Codebase architecture: https://docs.mobench.org/codebase Workspace layout, runtime layers, generated templates, integrations, stack, and ownership boundaries. - Testing strategy: https://docs.mobench.org/testing @@ -85,14 +106,14 @@ mobench was built to benchmark intense Rust workloads in mobile environments tha ```bash cargo install mobench -cargo mobench init -cargo mobench doctor -cargo mobench check --target android -cargo mobench build --target android --release -cargo mobench run --local --function fibonacci_30 --iterations 100 --warmup 10 -cargo mobench ci run --target android --browserstack --output target/mobench/ci -cargo mobench ci merge-split-runs --samples-dir target/mobench/ci/split --output-dir target/mobench/ci/merged --function sample_fns::fibonacci --device "Google Pixel 7-13.0" --iterations 5 -cargo mobench profile run --target android --function fibonacci_30 --output target/mobench/profile +mobench init +mobench doctor +mobench check --target android +mobench build --target android --release +mobench run --local --function fibonacci_30 --iterations 100 --warmup 10 +mobench ci run --target android --browserstack --output target/mobench/ci +mobench ci merge-split-runs --samples-dir target/mobench/ci/split --output-dir target/mobench/ci/merged --function sample_fns::fibonacci --device "Google Pixel 7-13.0" --iterations 5 +mobench profile run --target android --function fibonacci_30 --output target/mobench/profile ``` ## Output Artifacts diff --git a/public/og/app-automate.jpg b/public/og/app-automate.jpg index 76e680c..2f3efcd 100644 Binary files a/public/og/app-automate.jpg and b/public/og/app-automate.jpg differ diff --git a/public/og/authoring.jpg b/public/og/authoring.jpg index d0ea7b1..f2bfe8f 100644 Binary files a/public/og/authoring.jpg and b/public/og/authoring.jpg differ diff --git a/public/og/browserstack.jpg b/public/og/browserstack.jpg index 989a6ce..3734af3 100644 Binary files a/public/og/browserstack.jpg and b/public/og/browserstack.jpg differ diff --git a/public/og/build.jpg b/public/og/build.jpg index 9d3df3f..6fc6ba5 100644 Binary files a/public/og/build.jpg and b/public/og/build.jpg differ diff --git a/public/og/cli-reference.jpg b/public/og/cli-reference.jpg index 501c435..0534bfe 100644 Binary files a/public/og/cli-reference.jpg and b/public/og/cli-reference.jpg differ diff --git a/public/og/codebase.jpg b/public/og/codebase.jpg index b355b8a..4872be7 100644 Binary files a/public/og/codebase.jpg and b/public/og/codebase.jpg differ diff --git a/public/og/concepts.jpg b/public/og/concepts.jpg index 0c078c6..7537056 100644 Binary files a/public/og/concepts.jpg and b/public/og/concepts.jpg differ diff --git a/public/og/current-spec.jpg b/public/og/current-spec.jpg index 6f1683a..b6b24fd 100644 Binary files a/public/og/current-spec.jpg and b/public/og/current-spec.jpg differ diff --git a/public/og/diagrams.jpg b/public/og/diagrams.jpg index 0bd8596..81b9b45 100644 Binary files a/public/og/diagrams.jpg and b/public/og/diagrams.jpg differ diff --git a/public/og/docs.jpg b/public/og/docs.jpg index e371080..93c63bc 100644 Binary files a/public/og/docs.jpg and b/public/og/docs.jpg differ diff --git a/public/og/examples.jpg b/public/og/examples.jpg index 5a9e35a..9c2cc54 100644 Binary files a/public/og/examples.jpg and b/public/og/examples.jpg differ diff --git a/public/og/install.jpg b/public/og/install.jpg index ae78a1a..9588ec8 100644 Binary files a/public/og/install.jpg and b/public/og/install.jpg differ diff --git a/public/og/landing.jpg b/public/og/landing.jpg index 1f2c64c..f193df7 100644 Binary files a/public/og/landing.jpg and b/public/og/landing.jpg differ diff --git a/public/og/local-devices.jpg b/public/og/local-devices.jpg index 02741cd..38442b4 100644 Binary files a/public/og/local-devices.jpg and b/public/og/local-devices.jpg differ diff --git a/public/og/overview.jpg b/public/og/overview.jpg index f700ea7..46327af 100644 Binary files a/public/og/overview.jpg and b/public/og/overview.jpg differ diff --git a/public/og/profiling.jpg b/public/og/profiling.jpg index 2fe9edc..2b6a876 100644 Binary files a/public/og/profiling.jpg and b/public/og/profiling.jpg differ diff --git a/public/og/public-api.jpg b/public/og/public-api.jpg index cc8901c..44c23e4 100644 Binary files a/public/og/public-api.jpg and b/public/og/public-api.jpg differ diff --git a/public/og/quickstart.jpg b/public/og/quickstart.jpg index 9893e11..acc293a 100644 Binary files a/public/og/quickstart.jpg and b/public/og/quickstart.jpg differ diff --git a/public/og/reports.jpg b/public/og/reports.jpg index 0b60490..5ab5e3d 100644 Binary files a/public/og/reports.jpg and b/public/og/reports.jpg differ diff --git a/public/og/schemas.jpg b/public/og/schemas.jpg index 2333b42..262eace 100644 Binary files a/public/og/schemas.jpg and b/public/og/schemas.jpg differ diff --git a/public/og/sdk.jpg b/public/og/sdk.jpg index e2be4ef..c8ed9fb 100644 Binary files a/public/og/sdk.jpg and b/public/og/sdk.jpg differ diff --git a/public/og/setup-teardown.jpg b/public/og/setup-teardown.jpg index d3cfa64..2e2fc5a 100644 Binary files a/public/og/setup-teardown.jpg and b/public/og/setup-teardown.jpg differ diff --git a/public/og/testing.jpg b/public/og/testing.jpg index 5fe3938..4ef2027 100644 Binary files a/public/og/testing.jpg and b/public/og/testing.jpg differ diff --git a/public/og/troubleshooting.jpg b/public/og/troubleshooting.jpg index bf9cf61..6f9df8b 100644 Binary files a/public/og/troubleshooting.jpg and b/public/og/troubleshooting.jpg differ diff --git a/src/components/icons.tsx b/src/components/icons.tsx index 64aed38..8ed2441 100644 --- a/src/components/icons.tsx +++ b/src/components/icons.tsx @@ -34,4 +34,4 @@ export function Wordmark({ tag }: { tag?: string }) { export const GITHUB_URL = 'https://github.com/worldcoin/mobile-bench-rs' export const WORLD_URL = 'https://world.org' export const BROWSERSTACK_URL = 'https://www.browserstack.com/' -export const MOBENCH_VERSION = '0.1.43' +export const MOBENCH_VERSION = '0.1.47' diff --git a/src/og-pages.json b/src/og-pages.json index c6cd62a..a7e1db5 100644 --- a/src/og-pages.json +++ b/src/og-pages.json @@ -1,7 +1,7 @@ { "site": { "name": "mobench", - "version": "0.1.43", + "version": "0.1.47", "landingUrl": "https://mobench.org", "docsUrl": "https://docs.mobench.org" }, @@ -31,15 +31,15 @@ { "id": "sdk", "label": "SDK integration", "group": "Guides", "description": "Add mobench-sdk to a crate, configure runner backends, export native C ABI when needed, and use public runtime types." }, { "id": "build", "label": "Build artifacts", "group": "Guides", "description": "Generate Android and iOS runner projects, understand runner backends, and verify outputs under target/mobench." }, { "id": "local-devices", "label": "Local devices", "group": "Guides", "description": "Run against connected phones, Android emulators via Android Studio and ADB, and iOS simulators or connected devices via Xcode." }, - { "id": "browserstack", "label": "BrowserStack CI", "group": "Guides", "description": "Use hosted real devices, matrix resolution, split-sample merging, PR reporting, artifact fetching, and normalized resource metrics." }, + { "id": "browserstack", "label": "BrowserStack CI", "group": "Guides", "description": "Use hosted real devices, long-session reliability controls, secure reusable workflows, and the ProveKit production integration." }, { "id": "app-automate", "label": "App Automate setup", "group": "Guides", "description": "Set up BrowserStack App Automate for mobench Android Espresso and iOS XCUITest runs, including API uploads, build execution, devices, trial limits, and pricing expectations." }, { "id": "profiling", "label": "Profiling", "group": "Guides", "description": "Run local native profiling, produce trace events, semantic phase summaries, flamegraphs, and profile diffs." }, { "id": "reports", "label": "Outputs & reports", "group": "Reference", "description": "Understand summary JSON, Markdown summaries, CSV rows, split-run outputs, BrowserStack artifacts, PR comments, and profiling bundles." }, { "id": "cli-reference", "label": "CLI man pages", "group": "Reference", "description": "Exhaustive command reference for mobench: commands, subcommands, flags, expected inputs, outputs, defaults, and common examples." }, { "id": "schemas", "label": "Schemas", "group": "Reference", "description": "Machine-readable contracts for CI metadata, benchmark summaries, trace events, and fixture payloads." }, - { "id": "examples", "label": "Examples explained", "group": "Reference", "description": "What the basic benchmark and native C ABI / FFI examples demonstrate, and how their fixture outputs map to reports." }, + { "id": "examples", "label": "Examples explained", "group": "Reference", "description": "How the basic, native C ABI / FFI, and ProveKit integrations work, including fixtures and CI reports." }, { "id": "diagrams", "label": "Diagrams", "group": "Reference", "description": "Architecture, benchmark lifecycle, BrowserStack CI, profiling artifacts, and SDK versus CLI responsibility diagrams." }, - { "id": "current-spec", "label": "Current behavior", "group": "Specs", "description": "Current behavior and API contract for release 0.1.43: CLI, config, runners, public APIs, schemas, and compatibility boundaries." }, + { "id": "current-spec", "label": "Current behavior", "group": "Specs", "description": "Current behavior and API contract for release 0.1.47: CLI, config, runners, public APIs, schemas, and compatibility boundaries." }, { "id": "codebase", "label": "Codebase architecture", "group": "Codebase", "description": "Workspace layout, runtime layers, generated templates, integrations, stack, and ownership boundaries." }, { "id": "testing", "label": "Testing strategy", "group": "Codebase", "description": "Host tests, CLI smoke checks, split-run merge validation, CI contract checks, BrowserStack smoke tests, and profiling checks." }, { "id": "public-api", "label": "Public API", "group": "Codebase", "description": "Published crates, feature flags, serialized contracts, error boundaries, semver policy, MSRV, and release readiness." }, diff --git a/src/routes/docs.tsx b/src/routes/docs.tsx index 858b21b..68b969d 100644 --- a/src/routes/docs.tsx +++ b/src/routes/docs.tsx @@ -125,7 +125,9 @@ const EXTERNAL_DOCS = { ios: 'https://developer.apple.com/ios/', worldApp: 'http://world.org/world-app', worldId: 'https://docs.world.org/world-id', - provekit: 'https://provekit.org/', + provekit: 'https://provekit.org/', + provekitMainMobench: 'https://github.com/worldfnd/provekit/pull/450', + provekitV1Mobench: 'https://github.com/worldfnd/provekit/pull/451', } as const type BrandLogoName = 'rust' | 'browserstack' | 'androidStudio' | 'android' | 'xcode' | 'ios' @@ -299,9 +301,9 @@ const PAGES: PageDef[] = [ id: 'browserstack', label: 'BrowserStack CI', group: 'Guides', - description: 'Use hosted real devices, matrix resolution, split-sample merging, PR reporting, artifact fetching, and normalized resource metrics.', + description: 'Use hosted real devices, long-session reliability controls, secure reusable workflows, and the ProveKit production integration.', icon: Cloud, - toc: ['Credentials', 'Device resolution', 'CI contract', 'Split-sample merge'], + toc: ['Credentials', 'Secure reusable workflow', 'Long-session reliability', 'ProveKit case study', 'CI contract'], }, { id: 'app-automate', @@ -348,9 +350,9 @@ const PAGES: PageDef[] = [ id: 'examples', label: 'Examples explained', group: 'Reference', - description: 'What the basic benchmark and native C ABI / FFI examples demonstrate, and how their fixture outputs map to reports.', + description: 'How the basic, native C ABI / FFI, and ProveKit integrations work, including fixtures and CI reports.', icon: Boxes, - toc: ['Basic benchmark', 'FFI benchmark', 'Fixture outputs'], + toc: ['Basic benchmark', 'FFI benchmark', 'ProveKit integration', 'Fixtures to mobile runners', 'ProveKit CI', 'Fixture outputs'], }, { id: 'diagrams', @@ -364,7 +366,7 @@ const PAGES: PageDef[] = [ id: 'current-spec', label: 'Current behavior', group: 'Specs', - description: 'Current behavior and API contract for release 0.1.43: CLI, config, runners, public APIs, schemas, and compatibility boundaries.', + description: 'Current behavior and API contract for release 0.1.47: CLI, config, runners, public APIs, schemas, and compatibility boundaries.', icon: ListChecks, toc: ['Scope', 'Contracts', 'Compatibility'], }, @@ -449,7 +451,7 @@ const CONTENT: Record = { <>mobench keeps benchmark definitions in Rust and runs them in places mobile code actually pays its costs: Android iOS runners, host-only smoke runs, connected local devices, emulators simulators, BrowserStack devices, profiling flows., ], bullets: [ - <>A cargo mobench CLI for build, run, CI, reporting, BrowserStack, device resolution, profiling commands., + <>A mobench CLI for build, run, CI, reporting, BrowserStack, device resolution, profiling commands., <>A mobench-sdk runtime with timing, registry, runner builders, mobile builders, profiling helpers, UniFFI compatibility, BoltFFI support, and native C ABI support., <>A mobench-macros crate registers #[benchmark] functions through inventory., <>Stable output artifacts: JSON summaries, Markdown summaries, CSV rows, optional plots, profiling manifests, trace-event JSON, and flamegraph bundles., @@ -505,11 +507,11 @@ const CONTENT: Record = { code: { language: 'bash', value: `cargo install mobench -cargo mobench init -cargo mobench doctor -cargo mobench build --target android --release -cargo mobench run --local --function fibonacci_30 --iterations 100 --warmup 10 -cargo mobench ci run --target android --browserstack --output target/mobench/ci`, +mobench init +mobench doctor +mobench build --target android --release +mobench run --local --function fibonacci_30 --iterations 100 --warmup 10 +mobench ci run --target android --browserstack --output target/mobench/ci`, }, }, { @@ -553,14 +555,14 @@ pub fn checksum(data: &Vec) { { title: 'Rust and CLI', bullets: [ - <>Install Rust with rustup. Use Rust 2024-compatible toolchains; current workspace release line is 0.1.43 and documented MSRV is Rust 1.85., + <>Install Rust with rustup. Use Rust 2024-compatible toolchains; current workspace release line is 0.1.47 and documented MSRV is Rust 1.85., <>Install CLI cargo install mobench or build from repository when developing mobench itself., <>Add mobench-sdk, inventory, and required crate types to benchmark crates., ], code: { language: 'toml', value: `[dependencies] -mobench-sdk = "0.1.43" +mobench-sdk = "0.1.47" inventory = "0.3" [lib] @@ -572,7 +574,7 @@ crate-type = ["cdylib", "staticlib", "lib"]`, bullets: [ <>Android Studio is the normal route for installing Android SDKs, managing emulators, and exposing devices through ADB., <>Xcode provides command-line tools, simulators, signing, and connected-device support for iOS generated runner projects., - <>Use cargo mobench check --target android and cargo mobench check --target ios before chasing build failures., + <>Use mobench check --target android and mobench check --target ios before chasing build failures., ], }, { @@ -705,11 +707,11 @@ pub fn parse_file(input: &TempFile) { code: { language: 'toml', value: `[dependencies] -mobench-sdk = "0.1.43" +mobench-sdk = "0.1.47" inventory = "0.3" # Narrow registry-only form: -mobench-sdk = { version = "0.1.43", default-features = false, features = ["registry"] }`, +mobench-sdk = { version = "0.1.47", default-features = false, features = ["registry"] }`, }, }, { @@ -731,6 +733,8 @@ mobench-sdk = { version = "0.1.43", default-features = false, features = ["regis <>BoltFFI: fast, newer, and designed for smaller overhead than UniFFI, but not as mature yet., <>UniFFI: more mature and battle-tested, but usually carries larger binding overhead., <>Native FFI: recommended for serious benchmark paths because Android/iOS callers can use the narrow ABI the benchmark actually needs., + <>In 0.1.46, ci prepare --ffi-backend accepts uniffi, native-c-abi, or boltffi. The CLI value wins over project.ffi_backend in mobench.toml; if neither is set, UniFFI remains the default., + <>Native C ABI and BoltFFI preparation skip the UniFFI generator. UniFFI preparation resolves its lockfile from the Cargo workspace containing the benchmark crate., ], }, { @@ -755,18 +759,18 @@ mobench-sdk = { version = "0.1.43", default-features = false, features = ["regis bullets: [ <>Android: install SDK tooling, make ADB available, and create emulator profiles in Android Studio when simulator-style local runs are needed., <>iOS: install Xcode command-line tools and use Xcode to manage simulators, signing, and connected devices., - <>Run cargo mobench check for target-specific diagnostics before build commands., + <>Run mobench check for target-specific diagnostics before build commands., ], }, { title: 'Build commands', code: { language: 'bash', - value: `cargo mobench check --target android -cargo mobench check --target ios -cargo mobench build --target android --progress -cargo mobench build --target ios --progress -cargo mobench build --target both --release`, + value: `mobench check --target android +mobench check --target ios +mobench build --target android --progress +mobench build --target ios --progress +mobench build --target both --release`, }, }, { @@ -789,8 +793,8 @@ cargo mobench build --target both --release`, code: { language: 'bash', value: `adb devices -cargo mobench build --target android -cargo mobench run --target android --local --function my_crate::checksum_bench`, +mobench build --target android +mobench run --target android --local --function my_crate::checksum_bench`, }, }, { @@ -808,7 +812,7 @@ cargo mobench run --target android --local --function my_crate::checksum_bench`, ], code: { language: 'bash', - value: `cargo mobench run \\ + value: `mobench run \\ --target android \\ --function my_bench_crate::checksum_bench \\ --local-only \\ @@ -830,6 +834,135 @@ export BROWSERSTACK_ACCESS_KEY="your_access_key" export BROWSERSTACK_PROJECT="mobile-benchmarks"`, }, }, + { + title: 'Secure reusable workflow (0.1.44–0.1.47)', + body: [ + <>The 0.1.44 workflow split pull-request execution into secretless preparation, trusted prebuilt-only BrowserStack execution, and isolated reporting. Untrusted PR code never runs with BrowserStack credentials or a write-capable repository token., + ], + bullets: [ + <>Version 0.1.45 added a repository-relative prepare_script, platform-specific functions_ios and functions_android, and structured device arrays. The prepare hook runs with MOBENCH_CI_PREPARE=1 only in the secretless job., + <>Version 0.1.46 added rust_toolchain (default stable) and typed ffi_backend selection. Caller targets are installed only for the requested toolchain in secretless preparation; the trusted control plane stays independently pinned., + <>Version 0.1.47 adds a bounded max_completion_timeout_secs for long sessions while preserving the same security boundary. The default is 1,800 seconds and the trusted maximum is 21,600 seconds., + <>Every requested function/device pair must produce exactly one result. Missing, unexpected, ambiguous, or duplicate shards fail closed after diagnostic artifacts are collected., + <>Pin the workflow to its immutable revision, pass BrowserStack secrets explicitly, and never use secrets: inherit., + ], + code: { + language: 'yaml', + value: `jobs: + mobench: + uses: worldcoin/mobile-bench-rs/.github/workflows/reusable-bench.yml@f36ea5420bdb6633a6b8e91b00522ca9d5a2a84f + with: + pr_number: \${{ github.event.pull_request.number }} + head_sha: \${{ github.event.pull_request.head.sha }} + crate_path: crates/benchmarks + functions: '["benchmarks::critical_path"]' + functions_ios: '["benchmarks::ios_critical_path"]' + prepare_script: .github/scripts/prepare-mobench.sh + rust_toolchain: nightly-2026-03-04 + ffi_backend: native-c-abi + mobench_version: "0.1.47" + max_completion_timeout_secs: 7200 + android_devices: '[{"device":"Google Pixel 7","os_version":"13.0"}]' + platform: both + secrets: + BROWSERSTACK_USERNAME: \${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: \${{ secrets.BROWSERSTACK_ACCESS_KEY }}`, + }, + }, + { + title: 'Long-session reliability in 0.1.47', + body: [ + <>Release 0.1.47 makes multi-hour mobile proofs observable and bounded instead of merely extending an outer job timeout. max_completion_timeout_secs defaults to 1,800 seconds and is capped at a trusted six-hour maximum; ProveKit selects 7,200 seconds for its proof workloads., + ], + bullets: [ + <>iOS applies the same bounded timeout to launch configuration, the XCUITest completion wait, and BrowserStack polling. The SwiftUI/XCUITest runner emits a heartbeat interaction every five minutes while checking its completion predicate every 30 seconds, and BrowserStack receives a 15-minute XCUITest idle timeout., + <>Completed iOS JSON is transported through accessibility channels. The first channel containing valid completed report JSON wins, avoiding false completion from a marker that merely exists., + <>Android records the native C ABI worker PID and process name. Its watchdog detects a dead worker early and emits a structured worker_exit diagnostic; reportable JNA or native-link failures become benchmark failures instead of disappearing behind the full timeout., + <>Credentialed iOS and Android jobs run serially for constrained BrowserStack accounts. Android uses an always-style dependency condition so it can proceed when iOS fails or is skipped., + <>Every exact PR-head lookup retries transient GitHub API failures up to five times with bounded backoff. Exhausted lookups and SHA mismatches still fail closed before build or credential use., + ], + }, + { + title: 'ProveKit case study: merged PRs 450 and 451', + body: [ + <>ProveKit PR #450 integrates mobench into the main branch, and PR #451 carries the same pattern into v1. Both are merged, real-project examples using mobench 0.1.47 for expensive Noir proof generation on real iOS and Android devices., + <>The integration adds a non-published bench-mobile crate that builds as a Rust library, cdylib, and staticlib. It exports mobench's native C ABI and registers benchmarks with #[benchmark], so the same Rust proving implementation is callable from generated Android and iOS runners., + ], + bullets: [ + <>The measured set covers complete passport age-check proving, fragmented passport age-check proving, and OPRF proving. Setup functions prepare the prover, verifier, and witness outside the sample; destructive proof benchmarks use per_iteration to recreate state; verification and end-to-end variants remain available for focused investigation., + <>Phase wrappers label prepare, prove, and verify work for profiling. Results are passed through black_box, and Android/Linux builds call malloc_trim between large proof stages so released allocator pages do not distort later stages., + <>The crate's report conversion preserves duration, CPU time, peak memory, process peak memory, and timeline spans from the mobench SDK., + ], + }, + { + title: 'ProveKit fixture and mobile configuration', + body: [ + <>Before mobile packaging, bench-mobile/scripts/generate-fixtures.sh requires MOBENCH_CI_PREPARE=1, installs a pinned Noir toolchain, compiles the passport, OPRF, and P-256 programs, and gathers their JSON artifacts. build.rs embeds those generated files and fails the CI preparation when a required artifact is missing; ordinary local builds can use placeholders until fixtures are generated., + <>ProveKit's ordinary Cargo CI also runs the fixture script before its all-targets build and tests on nightly-2026-03-04. That catches benchmark-crate and fixture regressions on normal pull requests before anyone spends BrowserStack capacity., + ], + code: { + language: 'toml', + value: `[project] +crate = "bench-mobile" +library_name = "bench_mobile" +ffi_backend = "native-c-abi" + +[android] +package = "dev.world.benchmobile" +min_sdk = 24 +target_sdk = 34 +abis = ["arm64-v8a"] + +[ios] +bundle_id = "dev.world.benchmobile" +deployment_target = "13.0" +runner = "uikit-legacy" + +[browserstack] +ios_completion_timeout_secs = 7200 +android_benchmark_timeout_secs = 7200 +android_heartbeat_interval_secs = 10`, + }, + }, + { + title: 'How ProveKit invokes mobench in CI', + body: [ + <>A dispatch workflow resolves named device profiles into explicit arrays, then calls the reusable workflow with the exact pull-request number and full 40-character head SHA. The merged workflows reference the 0.1.47 release commit 8a2dfbb…; new integrations should use the final reusable-workflow pin f36ea542… shown below., + ], + code: { + language: 'yaml', + value: `browserstack: + uses: worldcoin/mobile-bench-rs/.github/workflows/reusable-bench.yml@f36ea5420bdb6633a6b8e91b00522ca9d5a2a84f + secrets: + BROWSERSTACK_USERNAME: \${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: \${{ secrets.BROWSERSTACK_ACCESS_KEY }} + with: + crate_path: ./bench-mobile + functions: '["bench_mobile::bench_passport_complete_age_check_prove","bench_mobile::bench_passport_fragmented_age_check_prove","bench_mobile::bench_oprf_prove"]' + prepare_script: bench-mobile/scripts/generate-fixtures.sh + platform: both + ios_devices: '[{"device":"iPhone SE 2022","os_version":"15"},{"device":"iPhone 14","os_version":"16"},{"device":"iPhone 16 Pro Max","os_version":"18"}]' + android_devices: '[{"device":"Samsung Galaxy S24","os_version":"14.0"},{"device":"Google Pixel 7","os_version":"13.0"},{"device":"Samsung Galaxy M32","os_version":"11.0"}]' + iterations: 2 + warmup: 1 + mobench_version: "0.1.47" + max_completion_timeout_secs: 7200 + rust_toolchain: nightly-2026-03-04 + ffi_backend: native-c-abi + pr_number: \${{ github.event.pull_request.number }} + head_sha: \${{ github.event.pull_request.head.sha }}`, + }, + }, + { + title: 'Triggers, trust boundary, and reports', + bullets: [ + <>Maintainers can start a run from workflow_dispatch or comment /mobench platform=both device_profile=triad iterations=2 warmup=1 on a pull request. The comment dispatcher accepts only GitHub OWNER, MEMBER, or COLLABORATOR associations; unsupported platforms/profiles and non-numeric counts fall back to safe defaults., + <>Concurrency is grouped by pull request with cancel-in-progress: false, so a new request does not terminate a costly active benchmark., + <>The reusable workflow checks out caller code and runs fixture generation/build/package only in secretless preparation. Credentialed jobs receive validated prebuilt bundles and explicit BrowserStack secrets; they do not check out caller code, execute caller scripts, or use secrets: inherit., + <>Each platform/function/device shard must report exactly once. Completeness checks fail on missing, duplicate, ambiguous, or unexpected results, while diagnostics and provider artifacts are still collected. Isolated reporting produces GitHub checks/PR output plus the standard summary.json, summary.md, and results.csv contract., + <>PR #450 invokes the reusable workflow directly after resolving devices. PR #451 adds a BrowserStack environment preflight and skips the credentialed call when the environment has no credentials; the benchmark crate, functions, devices, toolchain, timeout, and security model otherwise match., + ], + }, { title: 'Device resolution', bullets: [ @@ -839,9 +972,9 @@ export BROWSERSTACK_PROJECT="mobile-benchmarks"`, ], code: { language: 'bash', - value: `cargo mobench devices --platform android -cargo mobench devices resolve --platform android --device-matrix .github/mobench-devices.yml -cargo mobench ci run --target android --device-matrix .github/mobench-devices.yml --fetch`, + value: `mobench devices --platform android +mobench devices resolve --platform android --device-matrix .github/mobench-devices.yml +mobench ci run --target android --device-matrix .github/mobench-devices.yml --fetch`, }, }, { @@ -865,7 +998,7 @@ cargo mobench ci run --target android --device-matrix .github/mobench-devices.ym ], code: { language: 'bash', - value: `cargo mobench ci merge-split-runs \\ + value: `mobench ci merge-split-runs \\ --samples-dir target/mobench/ci/android/sample_fns__fibonacci/device/split \\ --output-dir target/mobench/ci/android/sample_fns__fibonacci/device \\ --function sample_fns::fibonacci \\ @@ -1016,17 +1149,17 @@ profiling: [ ], code: { language: 'bash', - value: `cargo mobench profile run \\ + value: `mobench profile run \\ --target android \\ --function sample_fns::fibonacci \\ --provider local \\ --backend android-native \\ --trace-events-output target/mobench/profile/trace-events.json -cargo mobench profile summarize \\ +mobench profile summarize \\ --profile target/mobench/profile/profile.json -cargo mobench profile diff \\ +mobench profile diff \\ --baseline target/mobench/profile/baseline/profile.json \\ --candidate target/mobench/profile/candidate/profile.json \\ --normalize`, @@ -1095,7 +1228,7 @@ pub fn prove_and_verify() { { title: 'Split-run outputs', bullets: [ - <>Release 0.1.43 can merge sample-*/summary.json inputs from one-sample CI jobs into the same summary.json, summary.md, and results.csv contract., + <>Mobench can merge sample-*/summary.json inputs from one-sample CI jobs into the same summary.json, summary.md, and results.csv contract., <>The merged JSON preserves raw samples, recomputes min, max, mean, median, and p95 timing statistics, and combines available resource measurements., <>Existing report, plot, comparison, and PR-comment tooling can consume merged output without a separate format adapter., ], @@ -1104,11 +1237,11 @@ pub fn prove_and_verify() { title: 'Report helpers', code: { language: 'bash', - value: `cargo mobench summary target/mobench/results.json -cargo mobench summary --format json target/mobench/results.json -cargo mobench summary --format csv target/mobench/results.json -cargo mobench report summarize --summary target/mobench/ci/summary.json -cargo mobench report github --pr 123 --summary target/mobench/ci/summary.json`, + value: `mobench summary target/mobench/results.json +mobench summary --format json target/mobench/results.json +mobench summary --format csv target/mobench/results.json +mobench report summarize --summary target/mobench/ci/summary.json +mobench report github --pr 123 --summary target/mobench/ci/summary.json`, }, }, { @@ -1122,7 +1255,8 @@ cargo mobench report github --pr 123 --summary target/mobench/ci/summary.json`, { title: 'Command model', body: [ - <>Use mobench directly, or cargo mobench when installed as a Cargo subcommand. Commands share the same global flags and most commands resolve project layout from explicit flags, config files, Cargo metadata, or workspace defaults., + <>Install with cargo install mobench, then invoke the canonical mobench executable directly. Release 0.1.47 does not install a cargo-mobench binary, so cargo mobench is not a supported command form., + <>Commands share the same global flags and most commands resolve project layout from explicit flags, config files, Cargo metadata, or workspace defaults., ], bullets: [ <>--dry-run: print the actions that would run without mutating files, invoking providers, or publishing reports., @@ -1135,7 +1269,6 @@ cargo mobench report github --pr 123 --summary target/mobench/ci/summary.json`, code: { language: 'text', value: `mobench [GLOBAL OPTIONS] -cargo mobench [GLOBAL OPTIONS] Global options: --dry-run Print what would be done without doing it. @@ -1204,8 +1337,8 @@ Outputs: Provider logs, status, and normalized benchmark summaries. Examples: - cargo mobench run --target android --function sample_fns::fibonacci --local-only - cargo mobench run --target android --function sample_fns::fibonacci --devices "Google Pixel 7-13.0" --release --fetch + mobench run --target android --function sample_fns::fibonacci --local-only + mobench run --target android --function sample_fns::fibonacci --devices "Google Pixel 7-13.0" --release --fetch mobench ci run Purpose: @@ -1230,8 +1363,8 @@ Outputs: Optional JUnit XML, plots, fetched BrowserStack artifacts. Examples: - cargo mobench ci run --target android --function sample_fns::fibonacci --local-only - cargo mobench ci run --target both --functions sample_fns::fibonacci,sample_fns::sort --device-tags smoke --release --fetch`, + mobench ci run --target android --function sample_fns::fibonacci --local-only + mobench ci run --target both --functions sample_fns::fibonacci,sample_fns::sort --device-tags smoke --release --fetch`, }, }, { @@ -1341,7 +1474,7 @@ Outputs: { title: 'CI commands', body: [ - <>CI helpers scaffold workflows, summarize offline results, and create GitHub Check Runs. Use ci run for the actual benchmark execution contract., + <>CI helpers scaffold workflows, prepare untrusted mobile packages, execute verified prebuilt bundles, summarize offline results, and create GitHub Check Runs. Use ci run for a conventional benchmark job; use ci prepare and ci run-prebuilt to preserve the pull-request credential boundary., ], code: { language: 'text', @@ -1356,6 +1489,26 @@ Defaults: Outputs: Workflow YAML and local composite/action files. +mobench ci prepare +Purpose: + Build and package caller-owned code without BrowserStack credentials. +Usage: + mobench ci prepare --target --source-sha [--ffi-backend ] [--crate-path ] [--functions ] [--release] [--output-dir ] [--manifest ] +Defaults: + --ffi-backend resolves from mobench.toml, then defaults to uniffi. + --output-dir target/mobench/prebuilt + --manifest target/mobench/prebuilt/manifest.json +Outputs: + A manifest and enumerated prebuilt mobile packages for trusted validation. + +mobench ci run-prebuilt +Purpose: + Upload and run a validated prebuilt bundle without invoking caller build tooling. +Usage: + mobench ci run-prebuilt --manifest --expected-source-sha --expected-platform --expected-functions --devices --output-dir +Security: + Run only after validating manifest paths, sizes, digests, platform, source SHA, functions, iterations, and warmup. + mobench ci summarize Purpose: Summarize benchmark results and optional BrowserStack metrics. @@ -1381,7 +1534,7 @@ Inputs: Outputs: /summary.json, /summary.md, and /results.csv. Example: - cargo mobench ci merge-split-runs --samples-dir target/mobench/ci/split --output-dir target/mobench/ci/merged --function sample_fns::fibonacci --device "Google Pixel 7-13.0" --iterations 5 --warmup 1 + mobench ci merge-split-runs --samples-dir target/mobench/ci/split --output-dir target/mobench/ci/merged --function sample_fns::fibonacci --device "Google Pixel 7-13.0" --iterations 5 --warmup 1 mobench ci check-run Purpose: @@ -1717,6 +1870,78 @@ pub fn benchmark_app_path() { }`, }, }, + { + title: 'ProveKit integration', + body: [ + <>ProveKit PR #450 on main and PR #451 on v1 are merged examples of integrating mobench 0.1.47 into a substantial Rust project. They benchmark expensive Noir proof generation through the same native code that ProveKit ships, on real Android and iOS devices., + <>Both integrations add a private bench-mobile crate built as a Rust library, cdylib, and staticlib. The crate calls mobench_sdk::export_native_c_abi!() and registers its functions with #[benchmark], letting generated mobile runners discover and invoke the benchmarks without maintaining a separate handwritten app., + ], + bullets: [ + <>The measured functions cover complete passport age-check proving, fragmented passport age-check proving, and OPRF proving., + <>Setup functions build the prover, verifier, and witness before timing starts. Destructive proving benchmarks use #[benchmark(setup = ..., per_iteration)] so each measured iteration receives fresh prepared state., + <>Proof results pass through black_box; prepare, prove, and verify phase wrappers also make the workload useful for mobench profiling., + <>Android/Linux runs call malloc_trim between large proof stages, reducing carry-over from allocator free lists when comparing later stages., + ], + }, + { + title: 'Fixtures to mobile runners', + body: [ + <>The repository-relative bench-mobile/scripts/generate-fixtures.sh hook requires MOBENCH_CI_PREPARE=1, installs a pinned Noir toolchain, compiles passport, OPRF, and P-256 programs, and gathers their JSON artifacts. The crate's build.rs embeds those files and fails CI preparation if a required artifact is missing., + <>The same fixture generator runs in ordinary ProveKit Cargo CI before the all-targets build and tests. That validates benchmark code and generated inputs on normal pull requests before a maintainer spends BrowserStack device time., + ], + code: { + language: 'toml', + value: `[project] +crate = "bench-mobile" +library_name = "bench_mobile" +ffi_backend = "native-c-abi" + +[android] +min_sdk = 24 +target_sdk = 34 +abis = ["arm64-v8a"] + +[ios] +deployment_target = "13.0" +runner = "uikit-legacy" + +[browserstack] +ios_completion_timeout_secs = 7200 +android_benchmark_timeout_secs = 7200 +android_heartbeat_interval_secs = 10`, + }, + }, + { + title: 'ProveKit CI', + body: [ + <>Maintainers can use manual dispatch or a trusted /mobench pull-request comment. The dispatcher accepts OWNER, MEMBER, or COLLABORATOR authors, safely parses platform/profile/iteration inputs, resolves the exact 40-character PR head SHA, and selects explicit three-device iOS and Android matrices., + ], + bullets: [ + <>The caller pins Rust nightly-2026-03-04, mobench 0.1.47, native C ABI preparation, two measured iterations, one warmup, and a 7,200-second maximum completion timeout., + <>Secretless preparation checks out ProveKit, generates fixtures, and builds signed or packaged mobile artifacts. Credentialed jobs receive validated prebuilt bundles and explicit BrowserStack secrets; they do not check out or execute caller code., + <>iOS and Android credentialed lanes run serially for account concurrency, while Android can still proceed after an iOS failure or skip. Every function/device pair must produce exactly one result., + <>Isolated reporting publishes GitHub checks and PR output alongside summary.json, summary.md, and results.csv. Concurrency is grouped per PR without cancelling an active benchmark., + <>PR #451 adds a BrowserStack environment preflight; PR #450 invokes the reusable workflow directly after device resolution. New callers should pin f36ea5420bdb6633a6b8e91b00522ca9d5a2a84f., + ], + code: { + language: 'yaml', + value: `uses: worldcoin/mobile-bench-rs/.github/workflows/reusable-bench.yml@f36ea5420bdb6633a6b8e91b00522ca9d5a2a84f +with: + crate_path: ./bench-mobile + functions: '["bench_mobile::bench_passport_complete_age_check_prove","bench_mobile::bench_passport_fragmented_age_check_prove","bench_mobile::bench_oprf_prove"]' + prepare_script: bench-mobile/scripts/generate-fixtures.sh + platform: both + mobench_version: "0.1.47" + max_completion_timeout_secs: 7200 + rust_toolchain: nightly-2026-03-04 + ffi_backend: native-c-abi + pr_number: \${{ github.event.pull_request.number }} + head_sha: \${{ github.event.pull_request.head.sha }} +secrets: + BROWSERSTACK_USERNAME: \${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: \${{ secrets.BROWSERSTACK_ACCESS_KEY }}`, + }, + }, { title: 'Fixture outputs', bullets: [ @@ -1804,10 +2029,19 @@ pub fn benchmark_app_path() { }, ], 'current-spec': [ + { + title: 'Release evolution: 0.1.44–0.1.47', + bullets: [ + <>0.1.44 established the hardened reusable-workflow boundary: untrusted pull-request code is built without secrets, trusted jobs consume only validated prebuilt artifacts, and reporting is isolated., + <>0.1.45 added safe caller preparation hooks, per-platform function lists, structured Android/iOS device arrays, and complete function/device result enforcement while preserving compatibility fallbacks., + <>0.1.46 added caller-pinned Rust toolchains, typed UniFFI/native C ABI/BoltFFI preparation, Cargo-workspace-aware UniFFI lockfile resolution, and unnecessary-generator avoidance for native backends., + <>0.1.47 hardened long runs with bounded completion timeouts, XCUITest heartbeats and accessibility result transport, Android native-worker death diagnostics, serialized credentialed platform jobs, and transient exact-head API retries., + ], + }, { title: 'Scope', bullets: [ - <>Release line documented by the current spec is 0.1.43., + <>Release line documented by the current spec is 0.1.47., <>The spec covers benchmark authoring, setup and teardown, SDK runtime API, native C ABI, generated runners, config files, CLI behavior, reports, BrowserStack, profiling, schemas, and compatibility boundaries., <>Historical design proposals are excluded from the current behavior contract., ], @@ -1825,7 +2059,8 @@ pub fn benchmark_app_path() { title: 'Compatibility', bullets: [ <>The serialized contracts are public API., -<>The default generated FFI backend remains UniFFI for maturity; boltffi and native-c-abi are configurable when you want lower overhead or a narrower native boundary., + <>The default generated FFI backend remains UniFFI; boltffi and native-c-abi are typed alternatives in 0.1.46., + <>Existing workflow callers remain compatible when the 0.1.45 and 0.1.46 inputs are omitted: platform-specific functions fall back to functions, structured devices fall back to legacy device/profile inputs, and rust_toolchain defaults to stable., <>Semver changes should protect benchmark authors and CI consumers from silent output drift., ], }, @@ -1872,10 +2107,10 @@ pub fn benchmark_app_path() { code: { language: 'bash', value: `cargo test --workspace -cargo mobench check --target android -cargo mobench check --target ios -cargo mobench ci run --target android --local-only --output target/mobench/ci -cargo mobench ci merge-split-runs --help`, +mobench check --target android +mobench check --target ios +mobench ci run --target android --local-only --output target/mobench/ci +mobench ci merge-split-runs --help`, }, }, { @@ -1955,7 +2190,7 @@ const EXTRA_CONTENT: Partial> = { crate["Rust benchmark crate"] --> macro["#[benchmark] macro"] macro --> registry["inventory registry"] registry --> sdk["mobench-sdk runtime"] - sdk --> cli["cargo mobench CLI"] + sdk --> cli["mobench CLI"] cli --> android["Generated Android runner"] cli --> ios["Generated iOS runner"] android --> localA["ADB device or emulator"] @@ -1983,10 +2218,10 @@ const EXTRA_CONTENT: Partial> = { code: { language: 'bash', value: `# 1. Confirm benchmark discovery. -cargo mobench list --crate-path crates/my-bench-crate +mobench list --crate-path crates/my-bench-crate # 2. Smoke-test the run/report path without mobile packaging. -cargo mobench run \\ +mobench run \\ --target android \\ --function my_bench_crate::checksum_bench \\ --crate-path crates/my-bench-crate \\ @@ -1996,8 +2231,8 @@ cargo mobench run \\ --output target/mobench/smoke/results.json # 3. Move to a real provider once discovery is known-good. -cargo mobench build --target android --release -cargo mobench ci run --target android --browserstack --output target/mobench/ci`, +mobench build --target android --release +mobench ci run --target android --browserstack --output target/mobench/ci`, }, }, { @@ -2005,9 +2240,9 @@ cargo mobench ci run --target android --browserstack --output target/mobench/ci` code: { language: 'mermaid', value: `flowchart TD - install["Install CLI"] --> init["cargo mobench init"] + install["Install CLI"] --> init["mobench init"] init --> write["Write #[benchmark] function"] - write --> list["cargo mobench list"] + write --> list["mobench list"] list --> smoke["Host-only smoke run"] smoke --> build["Build generated mobile runner"] build --> choose{"Choose provider"} @@ -2051,11 +2286,11 @@ default_warmup = 10`, code: { language: 'bash', value: `rustc --version -cargo mobench --version +mobench --version adb devices xcrun simctl list devices available -cargo mobench check --target android -cargo mobench check --target ios`, +mobench check --target android +mobench check --target ios`, }, }, ], @@ -2220,7 +2455,7 @@ println!("p95: {} ns", report.percentile_ns(95.0).unwrap_or_default());`, code: { language: 'mermaid', value: `flowchart TD - check["cargo mobench check"] --> resolve["resolve crate + config"] + check["mobench check"] --> resolve["resolve crate + config"] resolve --> generate["generate mobile runner"] generate --> compile["Gradle / xcodebuild"] compile --> artifacts["APK/AAB + test APK or IPA + XCUITest ZIP"] @@ -2274,7 +2509,7 @@ xcrun xctrace list devices`, participant Mobench participant BS as BrowserStack participant PR as Pull request - CI->>Mobench: cargo mobench ci run + CI->>Mobench: mobench ci run Mobench->>Mobench: resolve matrix + build artifacts Mobench->>BS: upload app + test suite Mobench->>BS: create App Automate build @@ -2440,8 +2675,8 @@ ajv validate \\ language: 'bash', value: `cd examples/basic-benchmark cargo test -cargo mobench list --crate-path . -cargo mobench run --local-only --function basic_benchmark::fibonacci_30`, +mobench list --crate-path . +mobench run --local-only --function basic_benchmark::fibonacci_30`, }, }, { @@ -2669,8 +2904,8 @@ fn summary_fixture_matches_schema_expectations() { phase --> build["Mobile build"] phase --> provider["Provider execution"] phase --> report["Report parsing"] - discover --> list["cargo mobench list"] - build --> check["cargo mobench check"] + discover --> list["mobench list"] + build --> check["mobench check"] provider --> logs["ADB / Xcode / BrowserStack logs"] report --> schema["Validate schema + inspect summary.json"]`, }, diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 2f1d80a..4c9c536 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -62,7 +62,7 @@ const FEATURES = [ { n: '01', title: 'CLI orchestration', - body: 'Initialize a run config, build Android or iOS artifacts, execute locally or on BrowserStack, merge split CI runs, fetch results, and render reports from one Cargo-native command surface.', + body: 'Use the installed mobench CLI to build Android or iOS artifacts, execute locally or on BrowserStack, prepare credential-free mobile bundles, and render stable reports.', icon: ( @@ -350,7 +350,7 @@ const copyCmd = () => {

Add the SDK and inventory to your crate, expose mobile FFI outputs, mark benchmark functions, - then let cargo mobench build and run the generated mobile apps. + then let mobench build and run the generated mobile apps.

Read the full guide -> @@ -359,9 +359,9 @@ const copyCmd = () => {
- - - + + +
summary.json + summary.md + results.csv ready
@@ -411,7 +411,7 @@ const copyCmd = () => {