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
//! # Motto - Compiler-as-a-Service for Multi-Platform SDK Generation
//!
//! Motto transforms Rust `schema.rs` files into platform-specific SDK toolkits
//! with a unified Single Source of Truth architecture.
//!
//! ## Architecture
//!
//! 1. **Static Analysis Frontend** - Parses Rust AST using `syn` to extract
//! structs and enums annotated for serialization. Computes SHA-256 fingerprint.
//!
//! 2. **Intermediate Representation (IR)** - Language-agnostic JSON/BSON manifest
//! with field offsets and bit-alignment requirements for Bitcode backend.
//!
//! 3. **Backend Emitters** - Generate platform-specific code:
//! - TypeScript/WASM (ESM with wasm-bindgen or napi-rs)
//! - Swift (iOS/macOS native)
//! - Kotlin (Android/JVM native)
//! - Unity (C# with unsafe DllImport)
//!
//! 4. **Runtime** - Bundled with SDK: bitcode, zstd, state machine,
//! retry logic, WebTransport.
pub use SchemaFingerprint;
pub use SchemaParser;
pub use IrGenerator;
pub use SchemaManifest;
/// Re-export commonly used types
/// Version information derived from Cargo.toml
pub const VERSION: &str = env!;
/// Protocol version byte (derived from minor version of motto.lock)
/// This is embedded in all generated packets for sidecar routing
pub const PROTOCOL_VERSION_BYTE: u8 = 1;