Development
Repository layout
Section titled “Repository layout”crates/web-runtime/ Canonical browser automation runtimecrates/web-bindings/ JavaScript and Web API bindingscrates/browser-dom/ DOM, style, and layout integrationcrates/network/ curl-impersonate transportcrates/screenshot/ CPU PNG renderingcrates/cli/ brimp executablecrates/cdp/ CDP protocol library and conformance workflowbindings/python/ CPython ABI3 packagebindings/node/ Node native addon and JavaScript adapterpersona/ Versioned persona schemadocs/ This Starlight siteweb-runtime is the only browser implementation. Every external interface
delegates navigation, JavaScript, lifecycle, and screenshots to its owner-thread
automation API.
Native prerequisites
Section titled “Native prerequisites”Source builds dynamically link JavaScriptCore and curl-impersonate. Set:
export BRIMP_JSC_LIB_DIR=/path/to/javascriptcore/libexport BRIMP_CURL_LIB_DIR=/path/to/curl-impersonate/libBRIMP_JSC_LIB_DIR must contain JavaScriptCore.framework on macOS,
JavaScriptCore.lib on Windows, or libJavaScriptCore.so on Linux.
Build and test
Section titled “Build and test”From the repository root:
cargo test --workspacecargo clippy --workspace --all-targets -- -D warnings./bindings/package-test.sh./crates/cdp/puppeteer-test.shThe package test is the combined macOS ARM64 Python and Node check. The
Puppeteer workflow installs its exact locked dependency into a temporary
directory and connects to brimp cdp.
For a quicker interface-specific cycle:
cargo test -p brimp-cli -p brimp-cdppython3 bindings/python/test_api.pyWork on the docs
Section titled “Work on the docs”Install the locked documentation dependencies:
cd docsnpm ciStart the live development server:
npm run devBuild and preview the production output:
npm run buildnpm run previewThe static production site is written to docs/dist/ and is configured for
https://docs.brimp.ai.
Deploy the docs
Section titled “Deploy the docs”The docs-pages.yml workflow deploys production builds to GitHub Pages. In the
repository’s Pages settings, choose GitHub Actions as the source, set the
custom domain to docs.brimp.ai, and enable HTTPS. Configure this DNS record:
docs CNAME lexiforest.github.ioThe custom domain belongs in GitHub’s Pages settings. GitHub ignores a
repository CNAME file when deployment uses a custom Actions workflow.
Documentation rules
Section titled “Documentation rules”- Treat each binding’s
SUPPORT.mdand public source types as authoritative. - Do not document planned APIs as if they exist.
- Keep examples runnable against the current release.
- Update the relevant API page whenever a public interface changes.
- Record implementation progress in the repository’s
TODO.md.
Architecture constraints
Section titled “Architecture constraints”Keep transport mechanics behind network::ResourceLoader; do not let DOM or
JavaScript bindings depend directly on a concrete HTTP client. Keep native
bindings and CDP as adapters over web-runtime, not alternate browser
implementations. Remove obsolete paths when interfaces change rather than
maintaining compatibility layers.