Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 1006 Bytes

File metadata and controls

13 lines (9 loc) · 1006 Bytes

Changes

0.4.0

  • Ergonomic improvements for structs: #[ts] now implements wasm_bindgen ABI traits natively on your Rust structs. This means you can use your custom structs directly in #[wasm_bindgen] exported function signatures and nested struct fields without needing to manually map to/from I-prefixed JS bindings or call .parse().
  • Generates cleaner TypeScript definitions (export interface StructName directly instead of an IStructName interface).
  • Deferred Parsing: For performance-sensitive use cases, you can still accept the generated IStructName bindings in your function signatures to defer .parse() operations until strictly needed.
  • extern "C" types generated by #[ts] now automatically derive Clone.

0.3.0

  • Unified #[ts] and #[ts_function] into a single #[ts] macro.
  • Add impl Into<JsValue> and impl From<Struct> for IStruct support for structs generated by #[ts], allowing Rust structs to be passed back to Javascript directly 1-to-1.