Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Malware / Trojaner / VirenKeep Calm and Secure AI: A Chat with Field Effect’s CEO Matt Holland(02.10.2026 um 03:31 Uhr)
•••••
AI & KI NachrichtenGitHub Release: can1357/oh-my-pi v18.4.10 (02.10.2026)(02.10.2026 um 03:35 Uhr)
••
Sichere ProgrammierungTest Planning: Before I Start Testing(02.10.2026 um 03:06 Uhr)
•
Sichere ProgrammierungWhat Jev Got Right: Judgment as an Interface, Not a Paragraph(02.10.2026 um 03:10 Uhr)
••
Malware / Trojaner / VirenKeep Calm and Secure AI: A Chat with Field Effect’s CEO Matt Holland(02.10.2026 um 03:31 Uhr)
•••••
AI & KI NachrichtenGitHub Release: can1357/oh-my-pi v18.4.10 (02.10.2026)(02.10.2026 um 03:35 Uhr)
••
Sichere ProgrammierungTest Planning: Before I Start Testing(02.10.2026 um 03:06 Uhr)
•
Sichere ProgrammierungWhat Jev Got Right: Judgment as an Interface, Not a Paragraph(02.10.2026 um 03:10 Uhr)
••
Intelligence View
⚡ tsecurity.de Intelligence

Bridgerust: One Rust Core, Every Ecosystem

Write high-performance infrastructure libraries for Python, Node.js, and other ecosystems, powered by a shared Rust core. As developers, we often face a…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

Write high-performance infrastructure libraries for Python, Node.js, and other ecosystems, powered by a shared Rust core.



As developers, we often face a difficult choice when building libraries: write in a high-level language for ease of use (but sacrifice performance), or write in a low-level language like C++/Rust and deal with the nightmare of maintaining bindings for multiple languages.



If you choose the latter, you likely juggle pyo3 for Python and napi-rs for Node.js. You end up with snippets of glue code scattered everywhere, inconsistent APIs across languages, and a complex build pipeline that breaks if you look at it wrong.



BridgeRust changes that.






What is BridgeRust?



BridgeRust is a unified framework that lets you write your library once in Rust and automatically deploy native, high-performance bindings to both Python and Node.js (with more languages coming).



It's not just a binding generator; it's a complete toolkit that handles:





  • Project Scaffold: Set up a multi-language project in seconds.


  • Unified Macro System: One #[export] macro for all languages.


  • Type Conversions: Automatic mapping of Vec, Option, Result, and more.


  • Building & Publishing: Integrated CLI to build wheels and npm packages.






The "Write Once" Magic



Let's look at how easy it is to expose Rust code to the world.






1. Initialize






bridge init my-awesome-lib
cd my-awesome-lib









2. Write Rust



In src/lib.rs, you simply tag your functions and structs with #[export].




use bridgerust::export;

#[export]
pub fn greet(name: String) -> String {
format!("Hello, {}! This is logic from Rust.", name)
}

#[export]
pub struct Point {
pub x: f64,
pub y: f64,
}

#[export]
pub fn fast_math(points: Vec<Point>) -> f64 {
// Heavy computation here...
points.iter().map(|p| p.x + p.y).sum()
}









3. Build






bridge build --all






That's it. BridgeRust generates:




  1. A Python wheel (pip install ...)

  2. A Node.js native addon (npm install ...)






Consuming the Library



The generated bindings feel native in every language.



Python:




import my_awesome_lib

print(my_awesome_lib.greet("Pythoneer"))

p1 = my_awesome_lib.Point(1.0, 2.0)
result = my_awesome_lib.fast_math([p1])






Node.js:




const lib = require("my-awesome-lib");

console.log(lib.greet("JavaScripter"));

const p1 = new lib.Point(1.0, 2.0);
const result = lib.fastMath([p1]);






Notice how fast_math became fastMath automatically in JS? BridgeRust handles idiomatic naming conventions for you.






Real-World Example: Embex



We built Embex, a universal vector database client, using BridgeRust. It connects to Pinecone, Qdrant, LanceDB, and more.



By using BridgeRust, we maintained a single codebase for the core logic (connection pooling, retry strategies, SIMD operations) while offering native packages for both Python (pip install embex) and Node.js (npm install @bridgerust/embex).






Why Choose BridgeRust?





  • Zero Boilerplate: No more manual PyModule or napi_register_module definitions.


  • Performance: Zero-cost abstractions where possible. Your code runs at Rust speeds.


  • Developer Experience: The bridge CLI simplifies the entire lifecycle from init to publish.


  • Consistency: Ensure your Python and JS users get exactly the same features and bug fixes at the same time.






Get Started



BridgeRust is open source and ready for you to try.




  1. Install the CLI: cargo install bridge

  2. Check out the logic: github.com/bridgerust/bridgerust

  3. Read the docs: bridgerust.dev



Stop writing glue code. Start building bridges. 🦀🌉

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Bridgerust: One Rust Core, Every Ecosystem

Thematisch verwandte Begriffe: Bridgerust, Rust, Core, Every · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag