Skip to content

Commit d1212a5

Browse files
committed
Update README.md to explain the new support for multiple backends
1 parent 8a28f1c commit d1212a5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ if you want to get involved, discuss the library, or just be kept up-to-date on
2424

2525
If you find SwiftCrossUI useful, please consider supporting me by [becoming a sponsor](https://github.com/sponsors/stackotter). I spend most of my spare time working on open-source projects, and each sponsorship helps me focus more time on making high quality libraries and tools for the community.
2626

27+
## Backends
28+
29+
Work has been started to support multiple different backends. Switching backends only requires changing a single
30+
line of code! Currently there's the Gtk 4 backend, as well as an experimental AppKit backend (`AppKitBackend`, macOS-only). All
31+
examples use `GtkBackend` for maximum compatibility, but you can update them manually to try out the various available backends.
32+
Work is being done to allow the backend used by the examples to be changed from the command line.
33+
34+
- `GtkBackend`: Requires gtk 4 to be installed, has maximum compatibility, and supports all SwiftCrossUI features.
35+
- `AppKitBackend`: ***Experimental***, only supports macOS, and currently supports a very limited subset of SwiftCrossUI features.
36+
2737
## Example
2838

2939
Here's a simple example app demonstrate how easy it is to get started with SwiftCrossUI:
@@ -37,6 +47,9 @@ class CounterState: Observable {
3747

3848
@main
3949
struct CounterApp: App {
50+
// An experimental AppKit backend is also available when on macOS (try AppKitBackend)
51+
typealias Backend = GtkBackend
52+
4053
let identifier = "dev.stackotter.CounterApp"
4154

4255
let state = CounterState()

0 commit comments

Comments
 (0)