#attributes #typeshare #marker #generator

macro typeshare_marker

Include marker attribute for the typeshare generator

1 unstable release

0.0.1 Aug 17, 2019

#5 in #typeshare

MIT license

2KB

typeshare_marker

Typeshare is a utility that parses Rust structs and enums and generates code in TypeScript, Swift, and Java for FFI interop.

The typeshare_marker implements an attribute for marking Rust types that should be processed by the typeshare.

For example,

// Contents of src/person.rs file.
#[typeshare]
pub struct Person {
    name: String,
    email: String,
}
cargo install typeshare
typeshare --type=ts src/person.rs

No runtime deps