1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! # gear-mesh
//!
//! Next-generation Rust to TypeScript type definition sharing library.
//!
//! ## Features
//!
//! - **Type Conversion**: Automatic Rust → TypeScript type conversion
//! - **Branded Types**: Newtype pattern → TypeScript Branded Types
//! - **Doc Comments**: Rust doc comments → JSDoc
//! - **BigInt Support**: Automatic i64/u64 → bigint conversion
//! - **Validation**: Runtime validation function generation
//! - **Serde Integration**: Full serde attribute support
//!
//! ## Quick Start
//!
//! ```rust
//! use gear_mesh::GearMesh;
//!
//! #[derive(GearMesh)]
//! #[gear_mesh(branded)]
//! struct UserId(i32);
//!
//! #[derive(GearMesh)]
//! struct User {
//! id: UserId,
//! name: String,
//! email: Option<String>,
//! }
//! ```
//!
//! Generated TypeScript:
//!
//! ```typescript
//! type Brand<T, B> = T & { readonly __brand: B };
//!
//! export type UserId = Brand<number, "UserId">;
//! export const UserId = (value: number): UserId => value as UserId;
//!
//! export interface User {
//! id: UserId;
//! name: string;
//! email?: string | null;
//! }
//! ```
//!
//! ## CLI Usage
//!
//! Install the CLI tool:
//!
//! ```bash
//! cargo install gear-mesh-cli
//! ```
//!
//! Generate TypeScript definitions:
//!
//! ```bash
//! gear-mesh generate --input src --output bindings
//! gear-mesh watch --input src --output bindings
//! ```
//!
//! ## Configuration
//!
//! Create `gear-mesh.toml`:
//!
//! ```toml
//! [generator]
//! use_bigint = true
//! generate_branded = true
//! generate_jsdoc = true
//!
//! [paths]
//! input = "src"
//! output = "bindings"
//! ```
// Re-export everything from gear-mesh-generator (which includes the facade)
pub use *;
// Explicitly re-export commonly used items for discoverability
pub use ;
pub use GearMesh;
// Re-export inventory for use in proc-macro
pub use inventory;
// Automatic type collection
pub use ;
// Output path registry for automatic generation
pub use register_output;
pub use extract_type_dependencies;
// Export types macro for build-time type generation