Crates.io | typeshare_marker |
lib.rs | typeshare_marker |
version | 0.0.1 |
source | src |
created_at | 2019-08-17 17:14:33.661562 |
updated_at | 2019-08-17 17:14:33.661562 |
description | Include marker attribute for the typeshare generator. |
homepage | |
repository | https://github.com/1Password/typeshare_marker |
max_upload_size | |
id | 157655 |
size | 1,950 |
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