Expand description
TypeScript IR emitter (gen-ts).
Emit TypeScript IR types from an explicit Rust IR_ELEMENTS spec (SoT with models).
Static preamble / enums / supporting / footer live in src/codegen/*.ts via
include_str!. The remaining push_str calls are intentional: per-element
interfaces and the WidgetElement union are generated from IR_ELEMENTS
so exhaustiveness tests stay coupled to crate::models::WidgetElement.
Enums§
- Wire
Type schema - Wire type of one schema property (nullability dropped: every field is optional).
Functions§
- element_
fields schema - Union of every element’s properties (style included) → wire type, from the schema the host validates with. Panics on a name used with two different types.
- emit_
widget_ element_ swift schema swift/Sources/TauriWidgets/Generated/WidgetElement.swift: the flatCodableelement every SwiftUI renderer decodes, generated from the Rust IR so no field can drift.- emit_
widget_ types_ ts - Emit
guest-js/generated/widget-types.ts. - emit_
wire_ catalog_ kotlin - Wire type constants for Android Glance renderer (JSONObject path stays dynamic).
- emit_
wire_ catalog_ swift - Wire type strings + field hints for Swift (flat Codable stays in Models.swift).
- emit_
wire_ fields_ kotlin schema android/src/main/java/render/WireFields.kt: every field name as a constant, plus the fields each element type accepts (renderers read JSONObject keys through these).