Skip to content

To be : bridge Dart and Rust code with ease through proc macros

Notifications You must be signed in to change notification settings

sachaarbonel/dodge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A set of proc macros for generating a C API automatically

Usage

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

  • function
  • method
  • class
  • list all public facing struct, impl traits of a trait etc and generate wrapper around them

About

To be : bridge Dart and Rust code with ease through proc macros

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages