Rust SDK for cross-platform app development with shared core logic
Top 22.2% on sourcepulse
Crux enables cross-platform application development by sharing a Rust-based business logic core across mobile (iOS/Android) and web targets. It targets developers seeking to maximize code reuse for application behavior while leveraging native or declarative UI frameworks like SwiftUI, Jetpack Compose, or React/Vue. This approach aims to reduce development time and improve consistency by centralizing complex logic in a single, testable Rust codebase.
How It Works
Crux employs an architecture inspired by Elm, strictly separating pure computational logic from side effects. The Rust core is compiled into platform-specific libraries (static library for iOS, dynamic library via JNI for Android, WebAssembly for web). Side effects, such as API calls or time-based operations, are managed by the core as explicit Effect
requests, which are then executed by the platform-specific "Shell." This isolation makes the core side-effect-free, enabling fast, high-level user journey tests without needing mocks or stubs. Communication between the core and shell is message-based, with type generation ensuring static type checking across languages for events, models, and effects.
Quick Start & Requirements
Highlighted Details
Event
, Model
, Effect
, and ViewModel
components with an update
function for state management.Maintenance & Community
Crux is actively developed and sponsored by Red Badger Consulting Limited. A Zulip community channel is available for discussion.
Licensing & Compatibility
The project appears to be licensed under the MIT license, allowing for commercial use and integration with closed-source applications.
Limitations & Caveats
Crux is pre-1.0 and under active development, meaning occasional breaking API changes may occur. The Capability API is being deprecated in favor of a new Command API, indicating ongoing architectural evolution.
2 days ago
Inactive