Expand description
§Jute
Jute is a schema-driven code generator for Rust, inspired by Apache ZooKeeper’s Jute serialization format.
This crate provides a high-level API to:
- Parse
.juteschema files into an abstract syntax tree (AST) - Resolve cross-file and cross-module type dependencies
- Validate schemas (unknown types, ambiguities, cycles, etc.)
- Generate idiomatic, type-safe Rust code
- Generate binary serialization and deserialization logic
The primary entry point to the API is JuteGenerator, which
orchestrates the full pipeline from schema parsing to code generation.
§Typical Workflow
- Author one or more
.juteschema files - Feed them into
JuteGenerator - Generate Rust code into a target directory
- Compile and use the generated types directly in your application
§Example
use jute::JuteGenerator;
JuteGenerator::new()
.add_src_file("schema/common.jute")
.add_src_file("schema/model.jute")
.add_out_dir("generated")
.generate()
.expect("Jute code generation failed");Re-exports§
pub use crate::code_generator::rust::JuteSerializable;pub use crate::errors::JuteError;
Modules§
Structs§
- Jute
Generator - High-level Jute code generation driver.