gear-mesh-core

Crates.iogear-mesh-core
lib.rsgear-mesh-core
version0.1.1
created_at2025-12-28 03:38:23.61487+00
updated_at2025-12-28 04:02:24.349452+00
descriptionCore types and intermediate representation for gear-mesh
homepagehttps://github.com/UtakataKyosui/GearMesh
repositoryhttps://github.com/UtakataKyosui/GearMesh
max_upload_size
id2008188
size35,433
ウタカタキョウスイ (UtakataKyosui)

documentation

README

gear-mesh-core

Core types and intermediate representation for the gear-mesh type conversion system.

This crate provides the fundamental data structures used to represent Rust types in a language-agnostic format, which can then be converted to TypeScript or other target languages.

Overview

gear-mesh-core defines:

  • Type Representation: GearMeshType, TypeKind, TypeRef for representing Rust types
  • Validation Rules: ValidationRule for runtime validation
  • Documentation: DocComment for preserving doc comments
  • Attributes: Type attributes like branded, validate, etc.

Usage

This crate is typically used as a dependency by:

  • gear-mesh-derive - The proc-macro that parses Rust types
  • gear-mesh-generator - The code generator that produces TypeScript

Most users should use the main gear-mesh crate instead of depending on this directly.

Example

use gear_mesh_core::{GearMeshType, TypeKind, PrimitiveType};

// Manually construct a type representation
let user_type = GearMeshType {
    name: "User".to_string(),
    kind: TypeKind::Struct(/* ... */),
    docs: None,
    generics: vec![],
    attributes: Default::default(),
};

Features

  • Serializable type representation using serde
  • Support for complex Rust types (structs, enums, generics)
  • Validation rule definitions
  • Documentation preservation

License

Licensed under either of:

at your option.

Commit count: 0

cargo fmt