How cunarist/rinf works
Main Components
a) Flutter Layer (GUI):
• Flutter widgets and UI components
• Platform-specific implementations (iOS, Android, Web, Desktop)
• Dart interface code (lib/src/interface.dart)
b) Bridge Layer:
• FFI Communication channel
• Message passing system (using Protobuf)
• Platform-specific bridges (interface_os.dart, interface_web.dart)
c) Rust Layer (Business Logic):
• Core Rust implementation (rust_crate/)
• Native functionality
• Multi-threading capabilities
Key Relationships to Highlight
a) Communication Flow:
• Bidirectional message passing between Flutter and Rust
• Signal streams for state updates
• Error handling pathways
b) Build System Integration:
• Cargokit integration
• Platform-specific build processes
• Native compilation workflow
[Flutter UI Layer]
• ▼
[Dart Interface Layer]
• Platform-specific implementations
• Message handling
• ▼
[FFI Bridge Layer]
• Protobuf serialization
• Channel management
• ▼
[Rust Core Layer]
• Business logic
• Native functionality
Important Elements
a) Platform Support:
• Supported platforms (iOS, Android, Web, Windows, macOS, Linux)
• Platform-specific bridges
b) Build Pipeline:
• Cargokit integration
• Native compilation process
• Platform-specific build tools
c) Message System:
• Protobuf schema handling
• Signal streams
• Error propagation
Implementation Details
• Version compatibility indicators
• Build artifact flow
Additional Notes
• Keep the main communication channels prominent
• Separation of concerns between UI and business logic
• How the framework handles cross-platform compatibility
• Important file locations and configuration points
• Simple integration
• High performance
• Cross-platform support
• Developer-friendly tooling
• Clean architecture separation