Repository boundaries and the local validation loop for contributors and coding agents.

Repository shape

src/           Rust binary and CLI adapter
crates/core/   browser-neutral protocol, IDs, models, and errors
crates/runtime browser-host framing, discovery, local IPC, and routing
tests/         Rust CLI/integration tests
extension/     shared TypeScript WebMCP runtime and browser adapters
docs/          Astro/ZueDocs site

The executable is named webmcp. Rust owns the language-agnostic protocol and local native behavior. Browser-native glue belongs in a deliberately small TypeScript/JavaScript extension. Bun is the package manager for TypeScript/JavaScript work.

Rust checks

just check-fast
just check

Useful primitives remain available directly:

cargo fmt --all -- --check
cargo check --locked --workspace --all-targets
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo test --locked --workspace --all-targets

Extension checks

cd extension
bun install --frozen-lockfile
bun run check

bun run check type-checks the extension, enforces browser-boundary rules, runs the focused registry tests, and builds both Chromium and Firefox development packages. Shared extension code must use browser.*; do not add a shared chrome.* dependency or webextension-polyfill.

For the controlled Chromium development fixture, build the Rust binary and register the direct Native Messaging host:

cargo build --locked
cd extension
bun run build
bun run setup:chromium-dev

For the Firefox development fixture:

cargo build --locked
cd extension
bun run build
bun run setup:firefox-dev

Firefox uses an MV3 background event page rather than Chromium’s MV3 service worker. Keep that lifecycle difference inside the Firefox adapter. Firefox document IDs are internal routing guards only; product-facing page identity remains the opaque exposure-generation PageId.

Docs checks

just docs-check
just docs-build

Run docs check and build serially.