Bridge CLI
The bridge CLI is the detailed companion for your BridgeRust development. It automates compilation, testing, publishing, and project management.
Installation
Section titled “Installation”# Install from crates.iocargo install bridgeOnce installed, the command is available as bridge.
Commands
Section titled “Commands”Initialize a new BridgeRust project from scratch.
bridge init my-project- —yes: Skip interactive prompts and use defaults.
integrate
Section titled “integrate”Integrate BridgeRust into an existing Rust project. This modifies your Cargo.toml to add necessary dependencies and features.
cd my-existing-rust-cratebridge integrate- —example: Adds a “hello world” example to your
src/lib.rs.
Builds your project for both Python and Node.js.
bridge build --target all --release- —target:
python,nodejs, orall(default). - —release: Build in release mode (optimized).
Runs tests for the specific bindings.
bridge test --target pythonCleans build artifacts.
bridge clean --target all- —cache: Also clean the build cache (generic Rust/Cargo cache).
workflows
Section titled “workflows”Generates GitHub Actions workflows for CI/CD.
bridge workflowsThis creates standard workflows in .github/workflows/ for:
- Testing pull requests.
- Publishing releases to PyPI and NPM.
Validates your project structure and configuration.
bridge check --verbose