BridgeRust Macros
Procedural macros for the BridgeRust framework.
Website: bridgerust.dev
Overview
This crate provides the core macros used to expose Rust code to Python and Node.js. It is re-exported by the main bridgerust crate and should generally not be used directly.
Macros
#[export]
Marks a function, struct, or impl block for export to Python and Node.js.
use export;
#[constructor]
Marks a method within an impl block as the constructor (__init__ in Python, constructor in JS).
use export;
#[error]
Registers a custom error type for cross-language error handling.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.