Repository navigation
StateUI 0.8.6 names a build's host by a package trait, so each head is a package of its own and Xcode, SourceKit-LSP and SwiftPM see the host as declared. An application is now a folder holding its stateui.json, which says what it is on every platform. The stateui tool lets one machine work every host: a Mac runs its GTK and WinUI heads in Parallels guests, and any machine works another through the tool's service. Every change, with its new spelling, is in the changelog.
Breaking changes
- A build names its host by a package trait, and each head is a package of its own.
STATEUI_HOSTis gone.Platforms/<Host>has its ownPackage.swift, which builds the application with its host's trait and depends onlib/StateUI.Headwith the same trait. The application's own package declares a trait per host and defines each host's condition (#if APPKIT, …) from it; nothing is read from an environment. WebAssembly takes the static productsStateUIStaticandStateUIHostStatic. - An application is a folder holding its
stateui.json, with itsidentifier,name,versionandbuild; neither the tool nor the VS Code extension takes a folder without one. Apple bundles takeCFBundleIdentifier,CFBundleShortVersionString,CFBundleVersion,CFBundleDisplayNameandCFBundleNamefrom it, and an application's ownInfo.plistmay no longer say them. An Android head takes itsapplicationId,versionName,versionCodeand label from it. - WinUI, GTK and the Web read what the application is from its
stateui.json, andapp.infotells its name, identifier, version and build there too.GTKHost.run(applicationID:)isGTKHost.run()andWebHost.run(name:applicationID:)isWebHost.run(). The browser keeps an application's values under its identifier, so values a page kept under its name are not read again. - A workspace's file is
stateui-workspace.json, and what was chosen stands out of git. The application to start lives in.stateui/workspace-settings.json, and each application's host and devices in its.stateui/settings.json.stateui settingsshows and changes both, and a workspace file still sayingstartupis refused. stateui project librarychanges the StateUI a project builds with, in one application or in a whole workspace.stateui workspace libraryandworkspace/useLibraryare gone; the protocol's call isproject/useLibrary.
New
- Every host from one Mac.
stateui devices --host gtk|winuilists the Mac's Parallels guests. With--device <guest>,stateui build,run,packageandrepo test --suite host:gtk|winuicopy the project into the guest and have the guest's ownstateuido the work; a package lands in the Mac'sartifacts, and Ctrl+C on the Mac stops the application in the guest.stateui guest preparelays the guest's tool,stateui guest pairits service, andstateui doctor --device <guest>checks the way there. Handbook: Every host from one Mac. - Working on another machine.
stateui service --listen <address:port>serves the tool's protocol over TCP to paired clients alone. Pairing takes a code, and every connection then proves its token by an HMAC-SHA256 challenge without ever sending the token.stateui remote add,declare,list,probeandremovepair a project with machines, which a workspace's manifest may declare for everyone. A paired machine's hosts, devices and browsers are destinations: builds, runs, packages, host suites, conformance runs and the portable and native plans run there, the checkout copied through the connection itself.stateui service installstarts the service with the user's session on macOS, Linux and Windows. Handbook: Working on another machine. - A debugger on every host, through the tool. The tool says how a debugger reaches every application it readies, and the VS Code extension maps that to lldb-dap or to its JavaScript debugger. A GTK or WinUI head on another machine is debugged through the service's relay to a port of this machine's loopback, so no debugger port listens on the network. A Web page is debugged with LLDB in Safari 27, which shows Swift's lines and call stack, or in Chromium's browsers with the WebAssembly DWARF Debugging extension.
stateui run --host gtk --gdbruns a GTK head under gdb, here or in a guest. - The tool decides, and every client shows it.
server/infonames the hosts this machine builds and where each one's heads run.devices/listsays which destinations a debugger reaches and which architectures each runs emulated. The VS Code extension reads all of it from the tool and keeps no table of its own. - Smaller additions.
stateui new --platforms appkit,web,winuimakes an application with those heads alone.stateui runhands an application on a simulator, a device, Android or a page everySTATEUI_variable of its environment. The operation journal keeps the newest 50 operations.
Fixed
- The tool:
- A checkout path changed to one that begins as the old one did is written once in a manifest.
repo test --plan native --devicegives the device to its own host's suite alone.- A failed operation's compiler error reaches the editor.
- A launch that
simctlrefuses says whatsimctlsaid. - A build gives SwiftPM five minutes to say where it laid the products, so a host's suite no longer fails without a word.
stateui doctorno longer asks for Python 3 for the Web.
- VS Code:
- Run Without Debugging runs the Debug build with no debugger on every host.
- Folders opened at once share one connection to the tool.
- No language server's configuration is written while the index's lease is unanswered.
- Web:
- A debug build keeps the DWARF the browser's debugger reads.
- A bar button whose look follows the pointer takes its click in Safari.
- WinUI: the host and the web view's backend build with Visual Studio 18.12, whose MSVC 14.52 refused the toolchain's Clang 21.
- GTK:
- A page replaced while the focus stood in it is let go.
- On Wayland, a field that takes the keyboard and goes at once no longer ends the process.
Moving over
- Move each head into a package of its own,
Platforms/<Host>/Package.swift, and declare the host traits in the application's manifest, asapps/HelloWorlddoes. DropSTATEUI_HOST; a head's files need no condition. - Add a
stateui.jsonbeside each application'sPackage.swift, for example{ "build": 1, "identifier": "com.example.notes", "schemaVersion": 1, "version": "1.0.0" }. Take the bundle's identifier, versions and names out of anInfo.plist. HavePlatforms/Android/build.gradle.ktsandAndroidManifest.xmlread the file, as the changelog shows. - Call
GTKHost.run()andWebHost.run()with no arguments. - Rename a workspace's
stateui.jsontostateui-workspace.json, and move itsstartupout withstateui settings --startup <application>. - Use
stateui project librarywhere you usedstateui workspace library. - An application with a WinUI relay of its own defines
_ALLOW_COMPILER_AND_STL_VERSION_MISMATCHin that target'scxxSettings. - Rebuild the tool as the README's Quick start shows, reinstall the VS Code extension with
stateui repo integration install --editor vscode, and raise StateUI to 0.8.6.