How atreyasuraj/middleware-sdk works
Main Components
a. Core Components:
• Shared Library Core (shared_lib)
• Arithmetic Module
• Crypto Module
• Web Bindings (shared_lib_web)
• UniFFI Binding Generator
• Generated Language Bindings
• Python Bindings
• TypeScript/WASM Bindings
Specific Elements
Build Process Flow:
shared_lib (Rust)
• → uniffi-bindgen → Python Bindings (.py + .dylib)
• → wasm-pack → TypeScript/WASM Bindings
Component Details:
• Technology labels: "Rust", "UniFFI", "wasm-pack"
• File extensions for generated artifacts
• Build tool dependencies
Additional Visualization Elements
• Build-time dependencies
• Runtime dependencies
• Generated artifacts
• Core components
• Build tools
Implementation Notes
Annotations for:
• Build commands
• Required environment setup
• Language-specific usage examples
• File placement requirements
TypeScript/WASM Binding Generation
Use clear boundaries between sections while showing their interconnections.
Technical Details to Highlight
• That shared_lib is the source of truth
• That uniffi-bindgen is a separate tool
• Demonstrate the parallel nature of Python and TypeScript binding generation
• Version compatibility notes if applicable
• The separation between core implementation and language bindings
• The automated nature of binding generation
• The different build processes for Python vs. TypeScript
• The runtime usage patterns for each target language
This system design should help developers understand both the build-time architecture and the runtime usage patterns of the generated bindings.