Skip to content

lapavoiserie/sui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sui

Build native Apple apps in Haxe. — GitHub | Documentation

sui is a framework that lets you write SwiftUI applications entirely in Haxe. Your Haxe code compiles to C++ via hxcpp, bridges into Swift, and produces genuine native apps for macOS, iOS, iPadOS, and visionOS.

Why sui?

  • Write Haxe — Use the language you know: type inference, pattern matching, macros, and the full Haxe ecosystem.
  • Native SwiftUI — Every view, modifier, and interaction maps directly to SwiftUI. No web views, no wrappers.
  • All Apple Platforms — Target macOS, iOS, iPadOS, and visionOS from a single codebase.

How It Works

flowchart LR
    A["Your Haxe Code"] --> B["sui macros"]
    B --> C["Swift/SwiftUI"]
    B --> D["C++ (hxcpp)"]
    C & D --> E["Xcode Build"]
    E --> F["macOS App"]
    E --> G["iOS App"]
    E --> H["visionOS App"]
Loading

Quick Example

import sui.App;
import sui.View;
import sui.ui.*;

class HelloApp extends App {
    static function main() {}

    public function new() {
        super();
        appName = "HelloHaxe";
        bundleIdentifier = "com.sui.helloworld";
    }

    override function body():View {
        return new VStack([
            new Text("Hello from Haxe!")
                .font(FontStyle.LargeTitle)
                .padding(),
            new Text("Running on macOS")
                .foregroundColor(ColorValue.Secondary),
            new Spacer(),
            new Text("Built with sui")
                .font(FontStyle.Caption)
                .foregroundColor(ColorValue.Gray)
        ]);
    }
}

Get Started

  • Getting Started — Install, create a project, build, and run.
  • Views — 40+ built-in views.
  • Modifiers — 58+ view modifiers reference.
  • State — State management, bindings, and observables.
  • Animations — Animated actions, transitions, and curves.
  • Bridge — Transparent Haxe/C++ bridge (automatic closures + explicit exports).
  • Native Extensions — Custom Swift files and SPM packages.
  • Examples — 18 example apps.

About

A Haxe/SwiftUI solution, making it possible to create macOS/ipadOS/iOS/visionOS apps (probably)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors