Tyzen ⚡
A lightweight, high-performance tool to generate TypeScript type definitions from Rust structs and enums. Perfect for Tauri apps and full-stack Rust/TypeScript projects.
Features
- 🚀 Lightning Fast: Generates types in milliseconds.
- 📦 Zero Config: Works out of the box with minimal setup.
- 🔌 Tauri Integration: First-class support for Tauri commands.
- 🛠️ Macro-based: Simple
#[derive(Type)]and#[command]attributes. - 🧩 Extensible: Easily supports custom types like
UuidandChrono.
Packages
tyzen: The core crate containing the logic for type generation.tyzen-macro: Procedural macros for deriving types and marking commands.tyzen-tauri: Specialized integration for Tauri applications.
Quick Start
1. Add Dependencies
Add tyzen to your Cargo.toml:
[]
= { = "0.1.5", = "../tyzen/tyzen" }
2. Define Your Types
use Type;
3. Generate TypeScript
Tauri Support
If you are using Tauri, you can use tyzen-tauri to automatically generate type-safe command declarations.
License
MIT / Apache-2.0