# Crux as a framework for rust core, native shell ## Context and Problem Statement Upon diving deeper into the options to implement the core in rust, but the outer shell in native code, it became apparent that this is still a relatively new field. Often times, these implementations rely on non-native solutions in the outer shell, like tauri, and flutter. These are best developed, but were discarded in 001. ## Considered Options - Writing from scratch - Crux ## Decision Outcome Although Mitchell Hashimoto has recently shown with his implementation of Ghostty, that it is perfectly possible to hand-roll a native shell for a different core (zig in his case), using a framework that is used by multiple other projects and people gives me more confidence in the approach. Although Crux is not perfect, and doesn't fully support Windows and Linux (yet), as they focus more heavily on mobile, it is a good enough starting point to build upon and learn more about both rust, and the development of this application. Crux heavily relies on ports-and-adapters architecture, as well as event sourcing, which is a good fit for the rust core, native shell approach. ### Consequences It will not be immediately possible to build a Windows and/or Linux outer shell. This is acceptable for now. Crux's reliance on event sourcing means it's possible to define which events and subsequent commands need to be supported, as shown here: ![002-events.png](002-events.png)