Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 28 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-05T09:42:37.000Z (about 5 years ago)
- Last Synced: 2024-12-13T10:07:29.047Z (about 1 month ago)
- Topics: dart, ffi, generator, proc-macro, proc-macro-attributes, rust
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- 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