typeshare_marker

Crates.iotypeshare_marker
lib.rstypeshare_marker
version0.0.1
sourcesrc
created_at2019-08-17 17:14:33.661562
updated_at2019-08-17 17:14:33.661562
descriptionInclude marker attribute for the typeshare generator.
homepage
repositoryhttps://github.com/1Password/typeshare_marker
max_upload_size
id157655
size1,950
Roustem Karimov (roustem)

documentation

README

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
Commit count: 0

cargo fmt