Expand description
§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
-
Static Analysis Frontend - Parses Rust AST using
synto extract structs and enums annotated for serialization. Computes SHA-256 fingerprint. -
Intermediate Representation (IR) - Language-agnostic JSON/BSON manifest with field offsets and bit-alignment requirements for Bitcode backend.
-
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)
-
Runtime - Bundled with SDK: bitcode, zstd, state machine, retry logic, WebTransport.
Re-exports§
pub use core::fingerprint::SchemaFingerprint;pub use core::parser::SchemaParser;pub use ir::generator::IrGenerator;pub use ir::manifest::SchemaManifest;
Modules§
- core
- Core module - Static Analysis Frontend
- emitters
- Backend Emitters Module
- ir
- Intermediate Representation (IR) Module
- prelude
- Re-export commonly used types
- runtime
- Runtime Module
Constants§
- PROTOCOL_
VERSION_ BYTE - Protocol version byte (derived from minor version of motto.lock) This is embedded in all generated packets for sidecar routing
- VERSION
- Version information derived from Cargo.toml