PHP, beyond the web with Strata's GTK bindings.
2/1/2026Strata NativeUI
I recently started tinkering with GTK bindings for Strata, aiming to create a library called NativeUI. The goal is simple: enable developers to build cross-platform desktop applications using Strata's strong typing and modern features.
Why NativeUI?
Desktop applications have always been a bit of a challenge in the PHP ecosystem. While web applications dominate, there are still many scenarios where a native desktop app is preferable. With NativeUI, I want to provide Strata developers with the tools they need to create beautiful, performant desktop apps without sacrificing safety or developer experience.
Now, GTK is not the only option for building desktop applications, but it is one of the most mature and widely used toolkits available for Unix. By leveraging GTK, NativeUI can provide a rich set of UI components and capabilities out of the box, allowing developers to ship cross-platform applications with ease.
A Quick Example
Let's take a look at a simple "Hello World" application using NativeUI:
In this example, we create a simple GTK application that displays a window with the text "Hello, Strata!".
And as you can see, we have TailwindCSS-like utility classes for styling, making it easy to create visually appealing UIs.
What's Next?
While NativeUI is planned to be part of Strata's standard library, it will probably not make it into Strata's initial release. Trying to add support for GTK has been a bit of a challenge. It makes it even harder that GTK4 support in PHP is non-existant to experimental.
So we have to solve that first.
Anyway, my main focus right now is on getting the core language and tooling ready. However, I believe that having robust desktop application support will be a game-changer for Strata and the PHP ecosystem as a whole.
For now, if you need to build desktop applications with PHP, you might want to explore existing solutions like NativePHP which focuses on Laravel, or PHP-GTK but seems to have died.
Get Involved
If you're interested in Strata and NativeUI, I'd love to hear from you! You can follow the project on GitHub. Your feedback and contributions will be invaluable as I continue to develop Strata and its ecosystem.