- Ergonomic improvements for structs:
#[ts]now implementswasm_bindgenABI 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/fromI-prefixed JS bindings or call.parse(). - Generates cleaner TypeScript definitions (
export interface StructNamedirectly instead of anIStructNameinterface). - Deferred Parsing: For performance-sensitive use cases, you can still accept the generated
IStructNamebindings in your function signatures to defer.parse()operations until strictly needed. extern "C"types generated by#[ts]now automatically deriveClone.
- Unified
#[ts]and#[ts_function]into a single#[ts]macro. - Add
impl Into<JsValue>andimpl From<Struct> for IStructsupport for structs generated by#[ts], allowing Rust structs to be passed back to Javascript directly 1-to-1.