zod_gen_derive 1.2.0

Derive macro for zod_gen - automatically generate Zod schemas from Rust types with serde rename support
Documentation

zod_gen_derive

Crates.io Documentation

Derive macro for zod_gen - automatically generate Zod schemas from Rust types.

Features

  • #[derive(ZodSchema)] procedural macro
  • Supports structs with named fields
  • Supports enums with unit variants
  • Automatic dependency resolution

Usage

use zod_gen::ZodSchema;
use zod_gen_derive::ZodSchema;

#[derive(ZodSchema)]
struct User {
    id: u64,
    name: String,
    is_admin: bool,
}

#[derive(ZodSchema)]
enum Status {
    Active,
    Inactive,
}

For more examples and documentation, see the main repository.