What is BridgeRust?
Why BridgeRust?
✨ Write Once, Deploy Everywhere
That's it. BridgeRust generates Python wheels and Node.js native addons automatically.use bridgerust::export; #[export] pub fn greet(name: String) -> String { format!("Hello, {}!", name) } #[export] pub struct Point { pub x: f64, pub y: f64, }
🚀 Zero Boilerplate
PyModule or napi_register_module definitions. Just tag your code with #[export] and BridgeRust handles the rest.
Before: 50+ lines of boilerplateAfter: One
#[export] macro
⚡ Maximum Performance
🎯 Idiomatic APIs
- Rust's
snake_case→ Python'ssnake_case - Rust's
snake_case→ JavaScript'scamelCase
Quick Start
# Install the CLI cargo install bridge # Initialize a new project bridge init my-awesome-lib # Write your Rust code with #[export] macros # Build for all platforms bridge build --all # Publish to PyPI and npm bridge publish
Key Features
#[export] macro for all languages✅ Automatic Type Conversions -
Vec, Option, Result handled automatically✅ Async Support - Works with Python's
asyncio and Node.js promises✅ Custom Types - Your structs become classes in both languages
✅ Integrated CLI - Build, test, and publish with one command
✅ Zero Boilerplate - No manual binding code required
Real-World Success
pip install embex) and Node.js (npm install @bridgerust/embex) packages.
By using BridgeRust, we maintained a single codebase for connection pooling, SIMD operations, and retry strategies while offering native packages for both ecosystems.
Perfect For
- Performance-Critical Libraries - Math, cryptography, data processing
- Infrastructure Tools - Database clients, network libraries, file systems
- AI/ML Libraries - Vector operations, model inference, data pipelines
- Cross-Platform Tools - Utilities that need to work in multiple ecosystems
Benefits
🎯 Consistency - Same features and bug fixes across all languages
🎯 Performance - Rust speed with zero-cost abstractions
🎯 Developer Experience - Simple CLI, zero boilerplate
Resources
- GitHub: github.com/bridgerust/bridgerust
- Documentation: bridgerust.dev
- CLI Crate: crates.io/crates/bridge
Stop writing glue code. Start building bridges.
