SwiftTUI icon indicating copy to clipboard operation
SwiftTUI copied to clipboard

Separate UI Logic from Rendering Implementation

Open hectr opened this issue 1 year ago • 0 comments

Hello @rensbreur and contributors 👋,

I've been experimenting with the idea of supporting alternative rendering backends/engines for SwiftTUI.

This could open up interesting possibilities. For example, a framebuffer-based rendering backend, or even support for developing SwiftTUI interfaces within Xcode Previews or the Swift REPL. While these ideas might not all fit directly into the core SwiftTUI framework, they could serve as valuable third-party additions, helping create a richer ecosystem for terminal-based UI development in Swift.

You can check out a working example of a renderer-agnostic SwiftTUI implementation in hectr/SwiftTUI#1.

Playing with the idea of alternative backends, I’ve added mouse support to SwiftTUI with very little changes to the core framework. Which you can see in hectr/SwiftTUI#2.

Looking forward to your thoughts!

hectr avatar Sep 20 '24 12:09 hectr