Crux: Cross-platform app development in Rust

Crux is an experimental approach to building cross-platform applications that aims to improve testability, code and behavior reuse, safety, security, and overall developer experience. It divides the application into two parts: a Core built in Rust, which handles the business logic, and a Shell built in the platform’s native language (such as Swift, Kotlin, or TypeScript), which acts as the interface with the external world and the platform on which the Core runs. The communication between the Core and Shell is done through a native FFI with cross-language type checking and message passing semantics. The architecture is event-driven and follows event sourcing principles, with the majority of state held in the Core and updates triggered by events in the Shell. The user interface layer is built using modern declarative UI frameworks, keeping it thin and leaving all other application logic to the shared Core. The Core is designed to be side-effect free, allowing for easier testing and separation of logic from effects. Instead of directly performing asynchronous work, the Core describes the intent for the work and passes it to the Shell to be executed. The entire interface is strongly typed, ensuring compatibility and detecting build failures when there are breaking changes in the Core. The main goals of Crux are to build application code once

https://redbadger.github.io/crux/

To top