https://github.com/sachaarbonel/dodge
To be : bridge Dart and Rust code with ease through proc macros
https://github.com/sachaarbonel/dodge
dart ffi generator proc-macro proc-macro-attributes rust
Last synced: 7 days ago
JSON representation
To be : bridge Dart and Rust code with ease through proc macros
- Host: GitHub
- URL: https://github.com/sachaarbonel/dodge
- Owner: sachaarbonel
- Created: 2019-10-30T20:33:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-05T09:42:37.000Z (over 6 years ago)
- Last Synced: 2025-10-12T05:24:27.204Z (9 months ago)
- Topics: dart, ffi, generator, proc-macro, proc-macro-attributes, rust
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A set of proc macros for generating a C API automatically
## Usage
```rust
use dodge::wrapper;
#[wrapper]
fn add(a: i32, b: i32) -> i32 {
a + b
}
// Expand to
// fn add(a: i32, b: i32) -> i32 { a + b }
// #[no_mangle]
// pub extern "C" fn rust_add(a: i32, b: i32) -> i32 { add(a, b) }
fn main() {
add(1, 2);
}
```
# TODOs
- [x] function
- [ ] method
- [ ] class
- [ ] list all public facing struct, impl traits of a trait etc and generate wrapper around them