Skip to content

Bridge CLI

The bridge CLI is the detailed companion for your BridgeRust development. It automates compilation, testing, publishing, and project management.

Terminal window
# Install from crates.io
cargo install bridge

Once installed, the command is available as bridge.

Initialize a new BridgeRust project from scratch.

Terminal window
bridge init my-project
  • —yes: Skip interactive prompts and use defaults.

Integrate BridgeRust into an existing Rust project. This modifies your Cargo.toml to add necessary dependencies and features.

Terminal window
cd my-existing-rust-crate
bridge integrate
  • —example: Adds a “hello world” example to your src/lib.rs.

Builds your project for both Python and Node.js.

Terminal window
bridge build --target all --release
  • —target: python, nodejs, or all (default).
  • —release: Build in release mode (optimized).

Runs tests for the specific bindings.

Terminal window
bridge test --target python

Cleans build artifacts.

Terminal window
bridge clean --target all
  • —cache: Also clean the build cache (generic Rust/Cargo cache).

Generates GitHub Actions workflows for CI/CD.

Terminal window
bridge workflows

This creates standard workflows in .github/workflows/ for:

  • Testing pull requests.
  • Publishing releases to PyPI and NPM.

Validates your project structure and configuration.

Terminal window
bridge check --verbose