js-macros 0.1.5

Quickly prototype procedural macros using JavaScript or TypeScript!
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use js_macros::SayHello;

/// This [SayHello] macro is defined in `../js-macros/custom_derive.ts`
#[derive(SayHello)]
#[hello_message = "Hello ts macro!"]
struct Example {}

trait SayHello {
    fn say_hello();
}

fn main() {
    Example::say_hello();
}