opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Desktop apps in Go with native UI or web frontend
GitHub RepoViews11

Project Description

View on GitHub

Go, Meet Desktop: Building Native and Web-Fronted Apps Without the Baggage

You want to build a desktop app. You also want to stay in Go, the language you actually like. But the usual paths push you into cgo, heavy runtimes, or a webview that makes you wonder if you're shipping an app or a browser. MyGo is a project that takes a different angle: desktop apps written in Go, with either a native GPU-drawn UI or a web frontend, all compiled into a single small binary.

What It Does

MyGo is a framework for building desktop applications in Go. Each window it creates shows one of two kinds of interface, and a single app (or even a single window) can mix them. The first option is a web page rendered in the webview your OS already ships: WKWebView on macOS, WebKitGTK on Linux, and WebView2 on Windows. You build the frontend with whatever web tools you like, and it calls into your Go code through a TypeScript client that's generated from your Go code.

The second option is native UI, written in Go alone using the ui package and drawn by MyGo itself on the GPU. No HTML, no JavaScript, no webview. The window opens immediately and uses little memory. Either way, you end up with a single Go binary of a few megabytes, built around low memory and CPU use.

Why It's Cool

  • Pure Go, no cgo. You can build for every desktop platform from any machine. That's a big deal if you've ever fought a C toolchain just to get a window on screen. It also means cross-compilation isn't a special case you have to babysit.

  • One codebase, phones included. The same app runs on iOS and Android, with pages in their web views and native UI on their GPUs. There's live reload on a simulator, emulator, or device, and builds for the App Store and Google Play. That's a lot of platform reach for something that started as a desktop tool.

  • Typed IPC that writes itself. For web-fronted windows, you bind Go services, stream values through channels, and send typed events. The TypeScript client is generated from your Go code, so the boundary between your frontend and backend is typed instead of stringly-typed guesswork.

  • A real Go UI toolkit. The native side isn't a toy. It has flexbox and grid layout, widgets, text editing with input methods, virtualized lists, SVG icons, animations, screen reader support, and views you can test without opening a window. There's even Liquid Glass on every platform via the glass plugin, and you can embed web pages inside native UI, under the menus and dialogs MyGo draws over them.

  • The boring stuff is handled. Desktop APIs cover windows, menus, tray, dialogs, notifications, global shortcuts, deep links, file associations, recent documents, Now Playing and media keys, system accent color and accessibility settings, and file watching. Shipping is covered too: app bundles and disk images, Windows installers, Debian and RPM packages, PKGBUILDs for Arch, a Linux install script, code signing, notarization, and signed auto-updates with delta updates and a Sparkle-style update window.

The two code samples in the README show how little ceremony is involved. A web-fronted window is a Greeter struct bound to the app, a window pointed at /, and a generated TypeScript call. A native window is a Go function of your app's state that draws a column, some text, and a button. No templates, no glue layers.

How to Try It

You'll need Go 1.27.3 or newer. For a web-frontend app, you'll also want Bun (or npm works fine).

  1. Scaffold an app:

    bunx mygo-cli init my-app
    # or: npx mygo-cli init my-app
    cd my-app
    bun run dev
    
  2. If you only want native UI, Go is all you need:

    go run github.com/egoist/mygo/cmd/mygo@late
    

From there, the README's two examples are the quickest way to see the shape of things: a bound Go service called from generated TypeScript, or a ui.View function that redraws from state. The repository is at github.com/egoist/mygo.

Final Thoughts

MyGo is aiming at a specific kind of developer: someone who likes Go, wants desktop and mobile reach, and doesn't want to pay for it with cgo, a bundled runtime, or a pile of platform-specific build scripts. The feature list is long, which is worth noting honestly; a project this broad earns trust through real apps shipped on it. If you've been putting off a desktop tool because the Go story felt incomplete, this is worth a weekend of poking around.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: mygoLast updated: November 28, 2026 at 02:49 AM