Help us shape the future of Go! Take the 2026 Go Developer Survey

golet

module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT

README

Golet

Go 跨平台桌面应用框架,兼顾原生 UI 和 Web 前端。

Golet 基于 MyGo 的完整实现迁移,保留 MIT 许可证和来源声明。Go 模块仍位于根目录;公共 Go 包的导入路径为 github.com/HyperparameterSI/golet/backend。

  • 原生 UI:纯 Go 编写,GPU 绘制,支持布局、输入法、无障碍、虚拟列表、编辑器、图表和动画。原生控件由框架绘制,并非操作系统原生控件的封装。
  • Web 前端:使用系统 WebView(macOS WKWebView、Linux WebKitGTK、Windows WebView2),不捆绑 Chromium。
  • shadcn 模板:TanStack Start、React、TypeScript、Vite、Tailwind CSS,提供组件源码、明暗主题、类型化 Go 调用和错误处理。可使用 shadcn CLI 继续添加组件。
  • Go ↔ TypeScript:生成类型安全客户端,支持事件、流式通道和插件。
  • 桌面能力:窗口、菜单、托盘、剪贴板、对话框、快捷键、文件监听、自动更新及跨平台打包。
  • 无 cgo:三平台可交叉编译;原生 UI 也支持 WebAssembly。

从零构建一个跨平台项目

Golet 有两种使用方式:通过 CLI 创建独立应用,或在已有 Go 项目中导入框架。以下流程使用 本地源码 + pnpm,不依赖 Golet 已发布到 Go module proxy 或 npm。应用与框架是两个独立目录,不要把业务项目放进 Golet 仓库。

1. 准备环境与框架
  • Go:当前源码要求 1.27.1+,以根目录 go.mod 为准。
  • Web 项目:Node.js 22.12+(推荐 24)及 pnpm。纯 Go 原生 UI 项目不需要 Node.js、pnpm 或 Bun。
  • WebView 运行环境:macOS 使用系统 WKWebView;Windows 需要 WebView2 Runtime;Linux 需要 WebKitGTK(Debian/Ubuntu 可安装 libwebkit2gtk-4.1-0)。原生 UI 的平台依赖见原生 UI 文档。

先将 Golet 源码放到本地 golet/。已有本仓库可直接使用,不必重新克隆;下面的示例工作目录是 workspace/:

workspace/
├── golet/          # 框架源码
└── my-desktop/     # 下一步由 CLI 创建

在框架仓库根目录执行:

cd golet
pnpm install
pnpm --dir frontend/packages/runtime build

这里只需要构建供业务项目使用的 golet-runtime;不用执行依赖 Bun 的框架完整构建/测试脚本。

2. 一条命令初始化 Web 桌面应用

仍在 golet/ 根目录执行(目标目录必须不存在或为空):

go run ./backend/cmd/golet init -golet . -template shadcn -name "My Desktop" -module example.com/my-desktop ../my-desktop

-golet . 使用当前框架源码,自动写入 Go 的 replace、前端 runtime 的本地 file: 依赖和本地 CLI 调用。-module 是新业务项目自己的 Go 模块名,可以换成你自己的仓库路径。

CLI 会生成:

my-desktop/
├── backend/main.go          # Go 服务、窗口和应用生命周期
├── frontend/
│   ├── src/components/      # React 页面、可编辑 shadcn 组件
│   ├── src/routes/          # TanStack 文件路由
│   ├── src/golet.ts         # 自动生成的 Go 调用客户端
│   ├── src/style.css        # Tailwind 与主题样式
│   ├── vite.config.ts
│   └── components.json
├── resources/icon.png       # 应用图标
├── golet.config.ts          # 名称、标识符、版本、前端路径、打包配置
├── go.mod                   # 独立业务模块,本地 replace 指向 golet
└── package.json             # 从此目录运行 pnpm 命令
3. 安装、启动与开发
cd ../my-desktop
pnpm install
pnpm dev

pnpm dev 同时启动 Vite 和 Go 桌面窗口,支持前端热更新与 Go 代码变更后的重建。它不是单独打开浏览器:网页要在 Golet 窗口里才有桌面 IPC 能力。

pnpm generate       # Go 服务方法变更后,重新生成 TypeScript 客户端
pnpm typecheck      # 检查前端类型
pnpm build          # 构建当前平台的独立桌面应用

新模板内部通过 npm run dev:web / npm run build:web 启动前端;npm 随 Node.js 提供,外层可以继续用 pnpm。若此前已生成旧项目,请把 golet.config.ts 中对应的 bun run ... 改成 npm run ...。

本地模式下不要移动或删除 golet/:生成的 Go replace、runtime file: 依赖及配置导入都引用它。团队协作时可约定同级目录,或在有正式发布版本后改用版本化依赖。

4. 添加 Go 业务能力并在 React 中调用

模板已包含 Greeter,在 backend/main.go 中给它增加方法即可:

// Author: HyperparameterSI

// Add adds two numbers; the method is exposed through the existing binding.
func (Greeter) Add(a, b int) int {
    return a + b
}

模板中的 golet.Bind(Greeter{}) 已注册此服务,不需要重复注册。新建服务时,使用导出的结构体与方法,并在 App.Run() 前调用 golet.Bind(YourService{})。

运行 pnpm generate 后,在 React 组件中调用生成的方法:

// Author: HyperparameterSI

import { useState } from "react";
import { Greeter } from "@/golet";
import { Button } from "@/components/ui/button";

export function AddExample() {
  const [message, setMessage] = useState("");
  const [pending, setPending] = useState(false);
  async function calculate() {
    setPending(true);
    try { setMessage(`计算结果:${await Greeter.add(20, 22)}`); }
    catch (error) { setMessage(error instanceof Error ? error.message : String(error)); }
    finally { setPending(false); }
  }
  return <div>
    <Button disabled={pending} onClick={calculate}>调用 Go</Button>
    <p role="status">{message}</p>
  </div>;
}

将该组件放入 frontend/src/components/,并在现有页面中引入。frontend/src/golet.ts 会由 CLI 覆盖,不要手工修改。耗时计算或 I/O 应放入后台任务,避免阻塞 UI 主线程;参见 IPC 文档。

5. 配置与跨平台打包

先编辑业务项目根目录的 golet.config.ts:

// 保留模板已有的 defineConfig 导入和其他字段,按产品修改:
name: "My Desktop",
identifier: "com.yourcompany.mydesktop",
version: "0.1.0",
main: "./backend",
frontendDist: "frontend/dist/client",
bindings: "frontend/src/golet.ts",
out: "build",

这是配置对象的字段片段,不是完整文件。默认应用图标采用 蓝紫渐变圆角底与白色圆环标识;替换 resources/icon.png 可设置自己的应用图标。TanStack Start 仅在构建时预渲染,最终应用内嵌 frontend/dist/client,不附带 Node.js 服务。

在业务项目根目录运行:

pnpm build

# 指定平台;下面直接调用本地 replace 指向的 Golet CLI
go run github.com/HyperparameterSI/golet/backend/cmd/golet build -platform windows/amd64
go run github.com/HyperparameterSI/golet/backend/cmd/golet build -platform linux/amd64

# 在 macOS 上生成同时支持 Apple Silicon / Intel 的应用
go run github.com/HyperparameterSI/golet/backend/cmd/golet build -platform darwin/universal
目标 产物位置 / 说明
macOS build/darwin-arm64/、build/darwin-amd64/ 或 build/darwin-universal/,包含 .app 和 .dmg
Windows build/windows-amd64/ 等目录,包含 .exe;生成安装器还需要 NSIS
Linux build/linux-amd64/ 等目录,包含可执行文件、Debian 包和安装归档

Golet 本身不依赖 cgo,但交叉编译可执行文件不等于可在任意宿主完成所有签名和安装器步骤:macOS 签名、DMG 和公证需要 macOS;Windows 安装器需要 NSIS;业务自行引入 cgo 后还需对应工具链。建议分别在 macOS、Windows、Linux CI 上构建、测试和发布。正式分发的签名、公证、安装器说明见分发文档。

6. 只用 Go:创建原生 UI 项目

在框架仓库根目录执行,不需要准备前端依赖:

go run ./backend/cmd/golet init -golet . -template native -name "My Native App" -module example.com/my-native-app ../my-native-app
cd ../my-native-app
go tool golet dev
go test ./...
go tool golet build

原生模板目前把 main.go、视图测试和 golet.json 放在业务项目根目录,不生成 frontend/。视图通过 github.com/HyperparameterSI/golet/backend/ui 构建;配置文件是 JSON,因此运行它也不需要 JavaScript 工具链。

7. 在已有 Go 项目中引入框架

下面从一个新 Go 模块演示;已有模块跳过 go mod init。先回到 workspace/(框架 golet/ 的父目录),再执行:

mkdir my-native-lib
cd my-native-lib
go mod init example.com/my-native-lib
go mod edit -go=1.27.1
go mod edit -replace=github.com/HyperparameterSI/golet=../golet
go mod edit -require=github.com/HyperparameterSI/golet@v0.0.0
go get -tool github.com/HyperparameterSI/golet/backend/cmd/golet

创建 main.go:

// Author: HyperparameterSI

package main

import (
    "log"
    "github.com/HyperparameterSI/golet/backend"
    "github.com/HyperparameterSI/golet/backend/ui"
)

func main() {
    golet.App.WhenReady(func() {
        golet.NewWindow(golet.WindowOptions{
            Title: "Hello Golet", Width: 640, Height: 420,
            Content: ui.View(func(c *ui.Context) {
                ui.Column(c).Fill().Center().Children(func() {
                    ui.Text(c, "Hello, Golet!").FontSize(28)
                })
            }),
        })
    })
    if err := golet.App.Run(); err != nil { log.Fatal(err) }
}

创建 golet.json:

{
  "name": "Hello Golet",
  "identifier": "com.example.hellogolet",
  "version": "0.1.0",
  "out": "build"
}

然后运行:

go mod tidy
go run .
# 或启用开发重载 / 应用打包
go tool golet dev
go tool golet build

引入的是 Go 模块 github.com/HyperparameterSI/golet,Go 代码中导入的公共包是 github.com/HyperparameterSI/golet/backend,两者不要混淆。

发布后的安装方式

当前文档以本地源码模式为可用路径,不假定 v0.1.0 或 npm 包已发布。待对应 Go tag、golet-cli 和 golet-runtime 均发布后,才可以省去本地 -golet:

# 仅在 v0.1.0 已正式发布后执行
go install github.com/HyperparameterSI/golet/backend/cmd/golet@v0.1.0
golet init -template shadcn -module example.com/my-desktop my-desktop

golet 需位于 PATH(通常来自 go env GOPATH 下的 bin 目录)。没有正式发布版本时,请使用前面的本地初始化流程。

项目结构

golet/
├── backend/                 # 全部 Go 实现
│   ├── *.go                 # 框架公共 API、IPC、窗口与生命周期
│   ├── cmd/golet/           # Go CLI(含可发布的嵌入式脚手架资源)
│   ├── internal/            # macOS / Linux / Windows 后端及渲染
│   ├── ui/                  # 纯 Go 原生 UI
│   ├── plugins/             # 插件的 Go 实现
│   └── examples/            # 示例 Go 入口与桌面构建配置
├── frontend/                # 全部 Web 应用及 TypeScript 包
│   ├── examples/studio/     # TanStack Start + shadcn + React + Vite
│   ├── examples/dashboard/ # 性能监控 Dashboard
│   ├── examples/todo/       # 轻量 TypeScript 示例
│   ├── packages/            # bridge / runtime / CLI npm 包
│   ├── plugins/             # 插件的 TypeScript 客户端
│   └── website/             # TanStack Start 文档站
├── docs/                    # 使用文档与架构
├── scripts/                 # 仓库构建、版本和性能工具
├── go.mod                   # 单一 Go 模块,根目录没有 Go 实现文件
└── package.json             # 前端工作区及统一命令

Studio 的视图在 frontend/examples/studio/src/components/app.tsx,文件路由在 src/routes/;Go 服务在 backend/examples/studio/main.go。类型化 IPC 客户端生成到前端的 src/golet.ts。

TanStack Start 使用 SPA 模式,将外壳预渲染为 dist/client/index.html,由 Go 嵌入并提供服务;dist/server 只用于构建时预渲染,不随桌面应用分发。业务后端仍使用 Go,不使用 Start server functions。

根目录快捷命令:bun run dev、bun run build:app、bun run build:web、bun run test:go。bun run build 构建 bridge/runtime/plugin 包。

本地开始

需要 Go 1.27.1+ 和 Node.js 22.12+(推荐 Node.js 24)。Studio 支持 pnpm,无需安装 Bun;框架自身的测试、bridge/plugin 打包和发布脚本仍使用 Bun。最终应用不依赖 Node.js 或 Bun。Go 的自动工具链机制可下载 go.mod 指定的版本。

pnpm install
pnpm dev         # 启动 Studio
pnpm build:web   # 构建 Web 静态资源
pnpm build:app   # 打包桌面应用
pnpm build:app:mac:intel      # Intel Mac:darwin/amd64
pnpm build:app:mac:arm64      # Apple Silicon:darwin/arm64
pnpm build:app:mac:universal  # 双架构安装包:Intel + Apple Silicon

Intel 和 Universal 打包命令可在 Apple Silicon 或 Intel Mac 上运行;签名与生成 DMG 需要 macOS。Studio 产物分别位于 backend/examples/studio/build/darwin-amd64/ 和 darwin-universal/。Universal 同时包含 x86_64 与 arm64。可选 Chromium 宿主仍需在目标机器单独安装,不会随 Studio 自动打包。

新生成的 shadcn 应用提供对应的 pnpm build:mac:intel、pnpm build:mac:arm64 和 pnpm build:mac:universal。已有应用也可直接执行 golet build -platform darwin/amd64。

上述 Studio 命令会自动编译本地 golet-runtime。开发框架自身时可继续使用 Bun:

bun install
bun run build

# shadcn 桌面示例(Go 后端 + React WebView)
go run ./backend/cmd/golet dev backend/examples/studio

# 纯 Go 原生 UI
go run ./backend/examples/counter-native
go run ./backend/examples/gallery

从本地源码生成应用(目标目录必须为空):

# 默认是 shadcn;显式指定 -template web 可生成轻量原生 TypeScript 前端
go run ./backend/cmd/golet init -golet "$PWD" -template shadcn ../my-desktop-app

# 纯 Go 原生 UI,默认使用中性 shadcn 风格主题
go run ./backend/cmd/golet init -golet "$PWD" -template native ../my-native-app

新建的默认 Web 项目也将 Go 入口放入 backend/、Web 源码与 Vite 配置放入 frontend/。Web 项目进入根目录执行 pnpm dev / pnpm build;原生项目执行 go tool golet dev / go tool golet build。-golet 指向本地仓库,不需要等待 Golet npm 包发布。

尚未发布到 npm 或 GitHub Releases:当前使用本地源码工作流。仓库中的发布配置是待配置的基础设施,不代表包已经存在。可选 SQLite / terminal 插件及 NSIS 使用原项目固定版本、SHA-256 校验的二进制下载;SQLite 的底层 ABI 符号保留原名以保持兼容。

使用 AI 生成 Golet 应用

Web 桌面应用默认使用 TanStack Start + React + TypeScript + Vite + shadcn/ui + Tailwind CSS。golet init 默认选择 shadcn 模板,也可以显式指定:

golet init -template shadcn -module example.com/my-app my-app
cd my-app
pnpm install
pnpm dev

新生成的 shadcn 项目会携带以下 AI 开发指引:

文件 用途
AGENTS.md 技术栈、目录边界、IPC、SPA 打包、代码注释与验证规则的统一来源
CLAUDE.md 引导 Claude Code 读取项目规则
.github/copilot-instructions.md 引导 GitHub Copilot 读取项目规则
README.md 启动、构建及可直接复制的 AI 提示词
.agents/skills/ CLI 随项目安装的 Golet 维护技能与参考资料

可以把下面这段话交给 AI:

使用 Golet 构建跨平台桌面应用。先读取项目 AGENTS.md 和 golet.config.ts。前端使用现有 TanStack Start + React + TypeScript + Vite + shadcn/ui,保持 SPA 模式;前端源码放 frontend/,Go 业务与系统能力放 backend/,通过生成的 Golet 客户端通信。复用 components/ui 和主题变量,不另建框架或 Node 服务。完成后运行相关类型检查、测试与构建,并说明未验证的平台。我要实现的功能是:……

README 负责说明,项目规则负责提示 AI,模板里的依赖、路由和构建配置提供实际默认实现。AI 工具是否自动加载规则取决于其支持情况;未自动读取时,应显式附上 AGENTS.md。这些文件不能强制所有模型遵循,也不能替代类型检查和构建验证。用户明确要求其他技术栈时,以用户要求为准。

已有项目可以按实际技术栈合并这些规则,不要覆盖原有项目约定。golet install-skills . 仅更新内置技能,不会自动补写或覆盖项目根目录的 AGENTS.md、CLAUDE.md 和 README。纯 Go 原生 UI 仍使用 -template native,轻量 TypeScript 前端使用 -template web。

shadcn 与原生主题

Web 模板的 components.json、@/ 路径别名和 CSS 语义变量已配置:

# 在生成的 Web 项目的 frontend 目录内
bunx shadcn@latest add dialog

原生应用可在初始化时创建主题,在视图中设置:

var theme = ui.ShadcnTheme(false) // true 为暗色

func view(c *ui.Context) {
    c.SetTheme(theme)
    ui.Column(c).Fill().Center().Children(func() {
        ui.Text(c, "Hello, Golet").FontSize(28).Bold()
        if ui.PrimaryButton(c, "Continue").Clicked() {
            // 应用逻辑
        }
    })
}

实现参考 shadcn Vite 配置 和 主题变量。原生主题使用相同中性色语义,实际绘制仍由 Go 完成。

验证与性能

CGO_ENABLED=0 go test ./...
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=linux go build ./...
CGO_ENABLED=0 GOOS=windows go build ./...
bun run test
bun run typecheck
bun run format:check

go test -run '^$' -bench '^BenchmarkListenerSnapshot$' -benchmem ./backend

事件监听器复用稳定订阅的不可变快照:16 个监听器的本轮基准由 128 B / 1 alloc 降为 0 B / 0 alloc,同机耗时中位数从 65.10 ns 降为 13.57 ns。Dashboard 使用固定容量环形历史与增量 IPC,暂停或隐藏时停止前端轮询。这些是局部工作量与临时分配的改进,实测空闲内存没有明显下降,不能推导为整个应用 CPU 或内存同比降低。shadcn 模板无定时轮询,空闲时不发送时钟 IPC。

Go 源码使用 gofmt;前端通过 bun run format 格式化、bun run format:check 检查(已加入 CI),生成文件除外。新增注释注明作者 HyperparameterSI,并优先解释单位、并发约束和设计原因。

详细验证与限制见 Golet 迁移说明,框架 API 见 文档,内部实现见 架构。

License

MIT。保留 LICENSE 中的原作者版权,来源版本见 NOTICE。

性能监控 Dashboard

pnpm dev:dashboard     # Golet Observatory,Web 开发端口 5174
pnpm build:dashboard   # 打包独立监控示例

Go 后端在 backend/examples/dashboard,Web 前端在 frontend/examples/dashboard。 展示真实进程 CPU、Go 堆/栈内存、分配速率、Goroutine、GC 暂停与事件、环境信息和健康检查,支持趋势窗口、暂停和 JSON 导出。 指标不包含 WebView 子进程;Go 运行时内存不等于 RSS。完整口径见 Dashboard 说明。

可选 Chromium 浏览器(实验性)

pnpm setup:chromium  # 首次构建 CEF 宿主,需要 Go、CMake 和 Xcode 命令行工具
pnpm dev:browser     # 已安装后直接运行

提供自定义原生标签栏、圆角地址栏和离线搜索首页,使用 CEF Alloy 渲染网页;Go 侧支持多标签管理、导航、历史、刷新、停止、状态订阅和生命周期管理。首页可在 frontend/examples/browser/newtab/ 自定义,修改后重新运行安装命令。只有选择该插件才需携带 CEF;当前 macOS 宿主的 Apple Silicon 已实测;Windows amd64/arm64 已提供实验性宿主与安装流程,尚待 Windows 原生编译和实机验证。它是独立浏览器窗口,嵌入 Golet 布局、Linux 宿主和自动集成 golet build 尚未实现。详情见 Chromium 插件 与 浏览器示例。

Golet Browser 还提供可选 AI 助手、确认后执行的页面操作、按网站授权的用户脚本,以及 Chrome 风格窗口下的本地 Manifest V3 插件加载。模型配置、扩展格式和兼容范围见 浏览器使用说明。

Directories

Path Synopsis
Package golet is a desktop application framework written in pure Go, without cgo.
Package golet is a desktop application framework written in pure Go, without cgo.
audio
Package audio plays sound: effects decoded into memory, music streamed as it plays, and sound an app makes itself, mixed in Go and sent to the system's audio output:
Package audio plays sound: effects decoded into memory, music streamed as it plays, and sound an app makes itself, mixed in Go and sent to the system's audio output:
audio/mp3
Package mp3 decodes MP3 files for package audio, with github.com/hajimehoshi/go-mp3.
Package mp3 decodes MP3 files for package audio, with github.com/hajimehoshi/go-mp3.
audio/vorbis
Package vorbis decodes Ogg Vorbis files for package audio, with github.com/jfreymuth/oggvorbis.
Package vorbis decodes Ogg Vorbis files for package audio, with github.com/jfreymuth/oggvorbis.
cmd/golet command
Command golet is the Golet development tool: it scaffolds projects, generates the typed TypeScript client for bound Go services, runs apps in development and builds packaged production apps.
Command golet is the Golet development tool: it scaffolds projects, generates the typed TypeScript client for bound Go services, runs apps in development and builds packaged production apps.
examples/blackhole command
Black hole is a black hole and its accretion disk, drawn by shaders written in Go (package ui/shader) on the GPU: every pixel's ray of light is traced back through the hole's gravity, so the disk's far side shows above and below the shadow, the side turning toward the camera blazes brighter and bluer, and the stars behind smear into arcs around an Einstein ring.
Black hole is a black hole and its accretion disk, drawn by shaders written in Go (package ui/shader) on the GPU: every pixel's ray of light is traced back through the hole's gravity, so the disk's far side shows above and below the shadow, the side turning toward the camera blazes brighter and bluer, and the stars behind smear into arcs around an Einstein ring.
examples/browser command
Browser launches the optional CEF host and a local assistant workspace.
Browser launches the optional CEF host and a local assistant workspace.
examples/chart-streaming command
Chart-streaming draws three rolling waveforms of 15,000 samples each, 1,000 new samples a second, reduced to a few points per pixel column.
Chart-streaming draws three rolling waveforms of 15,000 samples each, 1,000 new samples a second, reduced to a few points per pixel column.
examples/chat-glow command
Chat-glow is an assistant's window, lit as Apple Intelligence lights its own: while the assistant works, the window's edges glow in flowing colors, the field to write in glows in its ring, and "Thinking…" shimmers; the assistant's orb, a glass sphere of drifting light, quickens as it thinks.
Chat-glow is an assistant's window, lit as Apple Intelligence lights its own: while the assistant works, the window's edges glow in flowing colors, the field to write in glows in its ring, and "Thinking…" shimmers; the assistant's orb, a glass sphere of drifting light, quickens as it thinks.
examples/clipboard command
Clipboard demonstrates one data model for copying and dragging a note.
Clipboard demonstrates one data model for copying and dragging a note.
examples/confetti command
Confetti throws confetti in native UI, as canvas-confetti does on a web page: bursts of squares, circles, stars, hearts and emoji that fly out, slow down, fall, tumble and fade.
Confetti throws confetti in native UI, as canvas-confetti does on a web page: bursts of squares, circles, stars, hearts and emoji that fly out, slow down, fall, tumble and fade.
examples/counter-native command
Counter-native is a counter in native UI: a window Golet draws itself from Go, with no web page.
Counter-native is a counter in native UI: a window Golet draws itself from Go, with no web page.
examples/docs-demo command
Docs-demo shows the previews of the pages of native UI's docs: the website builds it for browsers (website/docs-demo.ts) and shows a demo in a frame wherever a page of docs/ui has a comment
Docs-demo shows the previews of the pages of native UI's docs: the website builds it for browsers (website/docs-demo.ts) and shows a demo in a frame wherever a page of docs/ui has a comment
examples/documents command
Documents is a notes editor of Markdown and text files in native UI, built on golet.NewDocuments: the File menu, a window per note, autosave, recovery after a crash, the proxy icon and the edited dot on macOS, and notes changed by other apps.
Documents is a notes editor of Markdown and text files in native UI, built on golet.NewDocuments: the File menu, a window per note, autosave, recovery after a crash, the proxy icon and the edited dot on macOS, and notes changed by other apps.
examples/drag-drop command
Drag-drop exchanges notes, text, URLs and files between two native UI windows and other applications.
Drag-drop exchanges notes, text, URLs and files between two native UI windows and other applications.
examples/effort-slider command
Effort-slider redraws ozzy's "galaxy brain effort slider" demo (https://x.com/ozzyxs1a/status/2107523169649389677) in native UI: a card whose slider steps from Low to Max with a brain for a thumb, and past Max into Galaxy, where the brain bursts, the card shakes, the track fills with twinkling pixels and dotted rays stream out of the brain.
Effort-slider redraws ozzy's "galaxy brain effort slider" demo (https://x.com/ozzyxs1a/status/2107523169649389677) in native UI: a card whose slider steps from Low to Max with a brain for a thumb, and past Max into Galaxy, where the brain bursts, the card shakes, the track fills with twinkling pixels and dotted rays stream out of the brain.
examples/embed-webview command
Embed-webview shows web pages in a window of native UI: a sidebar of tabs, each a web view, under a toolbar whose menu, select, tooltip and dialog show over the page, as the badge over its corner does.
Embed-webview shows web pages in a window of native UI: a sidebar of tabs, each a web view, under a toolbar whose menu, select, tooltip and dialog show over the page, as the badge over its corner does.
examples/farm command
Farm is a little farming game in native UI: walk a farm with the keyboard, till the grass, plant seeds, water them and harvest what grows, through a camera that follows you, as days turn to night, with sound and music.
Farm is a little farming game in native UI: walk a farm with the keyboard, till the grass, plant seeds, water them and harvest what grows, through a camera that follows you, as days turn to night, with sound and music.
examples/flyout command
Flyout opens flyouts from a small window of native UI: a list of colors, a note to edit and an About box with the look of the system's popovers on macOS.
Flyout opens flyouts from a small window of native UI: a list of colors, a note to edit and an About box with the look of the system's popovers on macOS.
examples/frameless command
Frameless shows a window without native chrome: the page draws its own title bar, marks it draggable with `--app-region: drag` and drives the window through the built-in window.golet.window controls.
Frameless shows a window without native chrome: the page draws its own title bar, marks it draggable with `--app-region: drag` and drives the window through the built-in window.golet.window controls.
examples/hello command
Hello is the smallest Golet app: one window and one Go method called from the page.
Hello is the smallest Golet app: one window and one Go method called from the page.
examples/internal/editordemo
Code editor shows Golet's code editor and diff viewer: files of several languages to edit, with completions of the words of the file, hovers, diagnostics of TODO comments and the changes against the file as it was in the gutter; and the diff of those changes, side by side or unified, which edits the same buffer.
Code editor shows Golet's code editor and diff viewer: files of several languages to edit, with completions of the words of the file, hovers, diagnostics of TODO comments and the changes against the file as it was in the gutter; and the diff of those changes, side by side or unified, which edits the same buffer.
examples/internal/gallerydemo
Gallery tours Golet's own user interface toolkit: a window drawn on the GPU from Go, without a web page.
Gallery tours Golet's own user interface toolkit: a window drawn on the GPU from Go, without a web page.
examples/internal/loadingdemo
Loading shows the 29 loading indicators of the loading plugin, after loading.dev, in native UI, with their options: size, color, easing, the ends of their strokes, and a pause.
Loading shows the 29 loading indicators of the loading plugin, after loading.dev, in native UI, with their options: size, color, easing, the ends of their strokes, and a pause.
examples/launcher command
Launcher is an app launcher in the manner of Spotlight and Raycast, in native UI: Alt+Shift+Space shows a panel over every app, full-screen ones included, without taking the active app away; type to find an installed app, Up and Down to choose, Enter to open it, Escape to clear or close.
Launcher is an app launcher in the manner of Spotlight and Raycast, in native UI: Alt+Shift+Space shows a panel over every app, full-screen ones included, without taking the active app away; type to find an installed app, Up and Down to choose, Enter to open it, Escape to clear or close.
examples/markdown-chat command
Markdown-chat is a chat with a pretend language model whose replies stream in token by token as Markdown: markdown.Stream shows a reply while it comes, markdown.View once it is done, and the list follows the end until the user scrolls up.
Markdown-chat is a chat with a pretend language model whose replies stream in token by token as Markdown: markdown.Stream shows a reply while it comes, markdown.View once it is done, and the list follows the end until the user scrolls up.
examples/mayoi command
Mayoi is a little survivor game in native UI, a fan game after the anime BanG Dream! It's MyGO!!!!!, whose band Golet is named after.
Mayoi is a little survivor game in native UI, a fan game after the anime BanG Dream! It's MyGO!!!!!, whose band Golet is named after.
examples/menubar-flyout command
Menubar-flyout is a menu bar app whose icon opens a flyout, the panel of the app: below the icon of the macOS menu bar, in a popover of the system's, and above an icon of the Windows taskbar.
Menubar-flyout is a menu bar app whose icon opens a flyout, the panel of the app: below the icon of the macOS menu bar, in a popover of the system's, and above an icon of the Windows taskbar.
examples/menubar-native command
Menubar-native is a menu bar app whose icon opens a window of native UI.
Menubar-native is a menu bar app whose icon opens a window of native UI.
examples/native command
Native tours the desktop integration: application and context menus, a tray icon, dialogs, notifications, a global shortcut, the clipboard and dark mode.
Native tours the desktop integration: application and context menus, a tray icon, dialogs, notifications, a global shortcut, the clipboard and dark mode.
examples/notes command
Notes is a notes app in native UI: notes in a sidebar, each edited as rich text (package ui/richtext), with a toolbar of its formats, the Format menu, links, Markdown shortcuts and export, and the notes saved as JSON in the user's configuration directory.
Notes is a notes app in native UI: notes in a sidebar, each edited as rich text (package ui/richtext), with a toolbar of its formats, the Format menu, links, Markdown shortcuts and export, and the notes saved as JSON in the user's configuration directory.
examples/piano command
Piano is a piano in native UI that plays with package audio: click or drag across its keys, play it from the keyboard, or have it play a tune.
Piano is a piano in native UI that plays with package audio: click or drag across its keys, play it from the keyboard, or have it play a tune.
examples/studio command
examples/terminal command
Terminal is a terminal app in native UI: the user's shell in a window, with the terminal plugin, which emulates it with Ghostty's libghostty-vt.
Terminal is a terminal app in native UI: the user's shell in a window, with the terminal plugin, which emulates it with Ghostty's libghostty-vt.
examples/text-buffer command
A large editable document backed by indexed text chunks.
A large editable document backed by indexed text chunks.
examples/text-input command
A custom text field built from Golet's text-input and layout primitives.
A custom text field built from Golet's text-input and layout primitives.
examples/timeline command
Timeline shows what a ui.Timeline is for: several tweens on one playhead, arranged and controlled together.
Timeline shows what a ui.Timeline is for: several tweens on one playhead, arranged and controlled together.
examples/todo command
Todo is a small but complete Golet app: typed services and events shared with a TypeScript frontend, persistence, dialogs, menus and multiple windows kept in sync.
Todo is a small but complete Golet app: typed services and events shared with a TypeScript frontend, persistence, dialogs, menus and multiple windows kept in sync.
examples/vibrancy command
Vibrancy shows a window in the style of a native macOS app, in native UI: a sidebar over a translucent material, under a hidden title bar whose window controls sit over the view, the traffic lights inset over the sidebar on macOS.
Vibrancy shows a window in the style of a native macOS app, in native UI: a sidebar over a translucent material, under a hidden title bar whose window controls sit over the view, the traffic lights inset over the sidebar on macOS.
examples/wind command
Wind is the texture behind the composer of the Claude desktop app's Code tab, redrawn in native UI: a field of monospaced characters that a wind lights in passing gusts, curling, streaked and thinning around the content, while each character steps through a set of its own.
Wind is the texture behind the composer of the Claude desktop app's Code tab, redrawn in native UI: a field of monospaced characters that a wind lights in passing gusts, curling, streaked and thinning around the content, while each character steps through a set of its own.
i18n
Package i18n reads the languages people read and picks, of those an app is written in, the one that suits them best, and says an app's messages in it.
Package i18n reads the languages people read and picks, of those an app is written in, the one that suits them best, and says an app's messages in it.
i18n/internal/gen command
Command gen writes the data of the Unicode CLDR that package i18n uses, from a pinned release of cldr-json, as Go source: `go generate ./i18n` runs it.
Command gen writes the data of the Unicode CLDR that package i18n uses, from a pinned release of cldr-json, as Go source: `go generate ./i18n` runs it.
internal/accelerator
Package accelerator parses Electron style keyboard accelerators such as "CmdOrCtrl+Shift+Z" into a platform neutral representation.
Package accelerator parses Electron style keyboard accelerators such as "CmdOrCtrl+Shift+Z" into a platform neutral representation.
internal/bridge
Package bridge embeds the renderer runtime that Golet injects into pages.
Package bridge embeds the renderer runtime that Golet injects into pages.
internal/darwin
Package darwin implements the macOS backend (AppKit + WKWebView) in pure Go: Objective-C is driven through the runtime with purego, no cgo.
Package darwin implements the macOS backend (AppKit + WKWebView) in pure Go: Objective-C is driven through the runtime with purego, no cgo.
internal/diff
Package diff compares sequences: the lines of two texts, or the words of two lines.
Package diff compares sequences: the lines of two texts, or the words of two lines.
internal/download
Package download fetches the files that Golet keeps in the user's cache: the native libraries plugins name in their golet-plugin.json, which the CLI and unpackaged programs download into <cache>/golet/natives/<sha256>/, and the tools the CLI runs, as NSIS.
Package download fetches the files that Golet keeps in the user's cache: the native libraries plugins name in their golet-plugin.json, which the CLI and unpackaged programs download into <cache>/golet/natives/<sha256>/, and the tools the CLI runs, as NSIS.
internal/fake
Package fake is an in-memory platform.Backend for testing the public API without a GUI.
Package fake is an in-memory platform.Backend for testing the public API without a GUI.
internal/gamut
Package gamut converts between sRGB, Display P3, Oklab and Oklch, and maps colors into a display's gamut as CSS Color 4 does.
Package gamut converts between sRGB, Display P3, Oklab and Oklch, and maps colors into a display's gamut as CSS Color 4 does.
internal/gpu
Package gpu turns scenes into what the GPU renderers draw: one instanced quad per operation, for a shader that computes rounded rectangles, borders, gradients, stripes, shadows and atlas coverage itself, in batches that share a scissor rectangle and an image.
Package gpu turns scenes into what the GPU renderers draw: one instanced quad per operation, for a shader that computes rounded rectangles, borders, gradients, stripes, shadows and atlas coverage itself, in batches that share a scissor rectangle and an image.
internal/gpu/d3d11
Package d3d11 draws scenes with Direct3D 11 into a window through a DXGI flip model swap chain, called through syscall like the rest of the Windows backend (no cgo).
Package d3d11 draws scenes with Direct3D 11 into a window through a DXGI flip model swap chain, called through syscall like the rest of the Windows backend (no cgo).
internal/gpu/d3d11/device
Package device creates Direct3D 11 devices: the device of package d3d11's renderer, and that of the Windows backend, which shows the controls of windows with a material through DirectComposition without the renderer.
Package device creates Direct3D 11 devices: the device of package d3d11's renderer, and that of the Windows backend, which shows the controls of windows with a material through DirectComposition without the renderer.
internal/gpu/gl
Package gl draws scenes with OpenGL 3.3, OpenGL ES 3.0 or WebGL 2 into the framebuffer bound when Render is called: the one GTK's GtkGLArea binds while it emits its render signal, or a canvas's (package web).
Package gl draws scenes with OpenGL 3.3, OpenGL ES 3.0 or WebGL 2 into the framebuffer bound when Render is called: the one GTK's GtkGLArea binds while it emits its render signal, or a canvas's (package web).
internal/gpu/gputest
Package gputest has what the tests of the GPU renderers share: a scene that draws every kind of operation, and a comparison of what a renderer drew with what the CPU renderer draws, which the renderers must match.
Package gputest has what the tests of the GPU renderers share: a scene that draws every kind of operation, and a comparison of what a renderer drew with what the CPU renderer draws, which the renderers must match.
internal/gpu/metal
Package metal draws scenes with Metal into a CAMetalLayer, called through the Objective-C runtime with purego like the rest of the macOS backend (no cgo).
Package metal draws scenes with Metal into a CAMetalLayer, called through the Objective-C runtime with purego like the rest of the macOS backend (no cgo).
internal/i18ngen
Package i18ngen reads the catalogs of an app's messages, checks them, and writes their typed accessors: Go functions in the catalogs' directory, which embed and register them, and a TypeScript module that formats the same messages in pages with golet-runtime.
Package i18ngen reads the catalogs of an app's messages, checks them, and writes their typed accessors: Go functions in the catalogs' directory, which embed and register them, and a TypeScript module that formats the same messages in pages with golet-runtime.
internal/i18nlink
Package i18nlink hands Golet's own strings (internal/l10n) what package i18n does not export: a library's catalog that does not link the formatting of the dates of messages, which i18n.NewLibraryCatalog does for the catalogs of libraries and apps.
Package i18nlink hands Golet's own strings (internal/l10n) what package i18n does not export: a library's catalog that does not link the formatting of the dates of messages, which i18n.NewLibraryCatalog does for the catalogs of libraries and apps.
internal/idlemem command
Command idlemem launches apps and reports how much memory each takes once idle, alone and with the processes it runs, its webview's: scripts/bench.ts measures release builds of examples/hello and examples/counter-native with it on every push to main.
Command idlemem launches apps and reports how much memory each takes once idle, alone and with the processes it runs, its webview's: scripts/bench.ts measures release builds of examples/hello and examples/counter-native with it on every push to main.
internal/inputlatency command
Command inputlatency measures how long input takes to show on screen in native UI on macOS: from when an event arrives to when the frame showing it reaches the display.
Command inputlatency measures how long input takes to show on screen in native UI on macOS: from when an event arrives to when the frame showing it reaches the display.
internal/l10n
Package l10n holds Golet's own strings, those of the controls of package ui, of the code editor and the diff viewer, and of the roles of menus, in the languages Golet is translated to: a library's catalog (see i18n.NewLibraryCatalog) of the namespace golet, whose functions say them in the language the app shows.
Package l10n holds Golet's own strings, those of the controls of package ui, of the code editor and the diff viewer, and of the roles of menus, in the languages Golet is translated to: a library's catalog (see i18n.NewLibraryCatalog) of the namespace golet, whose functions say them in the language the app shows.
internal/linux
Package linux implements the Linux backend (GTK 3 + WebKitGTK) in pure Go: the libraries are loaded at run time with purego, no cgo.
Package linux implements the Linux backend (GTK 3 + WebKitGTK) in pure Go: the libraries are loaded at run time with purego, no cgo.
internal/nsis
Package nsis pins the NSIS that golet build downloads on Windows to make the installer, and installs it into the user's cache directory, where makensis runs as it does from an installation.
Package nsis pins the NSIS that golet build downloads on Windows to make the installer, and installs it into the user's cache directory, where makensis runs as it does from an installation.
internal/platform
Package platform defines the contract between the public golet API and the native backends (WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows).
Package platform defines the contract between the public golet API and the native backends (WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows).
internal/prefetch command
Command prefetch downloads into the user's cache what this repository's tests otherwise download there while they run: the native libraries that the plugins name in their golet-plugin.json, for this platform, and on Windows the NSIS that golet build uses.
Command prefetch downloads into the user's cache what this repository's tests otherwise download there while they run: the native libraries that the plugins name in their golet-plugin.json, for this platform, and on Windows the NSIS that golet build uses.
internal/raster
Package raster draws scenes in memory: the software renderer behind headless rendering, window captures and windows without a GPU renderer.
Package raster draws scenes in memory: the software renderer behind headless rendering, window captures and windows without a GPU renderer.
internal/rope
Package rope stores text as a persistent tree of chunks of UTF-8: an AVL tree whose leaves own up to 4 KB of the text each, and whose nodes sum the bytes, runes, UTF-16 units and newlines below them, as Zed's rope sums its chunks.
Package rope stores text as a persistent tree of chunks of UTF-8: an AVL tree whose leaves own up to 4 KB of the text each, and whose nodes sum the bytes, runes, UTF-16 units and newlines below them, as Zed's rope sums its chunks.
internal/scene
Package scene is the display list the ui package paints a frame into and the renderers draw: rounded rectangles with borders and gradients, box shadows, glyphs from a shared atlas, images, effects and clips, in paint order.
Package scene is the display list the ui package paints a frame into and the renderers draw: rounded rectangles with borders and gradients, box shadows, glyphs from a shared atlas, images, effects and clips, in paint order.
internal/shader
Package shader compiles shaders written in Go's syntax into the intermediate representation of package shaderir, which its backends translate for each GPU renderer.
Package shader compiles shaders written in Go's syntax into the intermediate representation of package shaderir, which its backends translate for each GPU renderer.
internal/shaderir
Package shaderir offers intermediate representation for shader programs, forked from Ebitengine with package shader (see its documentation).
Package shaderir offers intermediate representation for shader programs, forked from Ebitengine with package shader (see its documentation).
internal/shaderir/interp
Package interp runs shaders on the CPU, for Golet's CPU renderer: it compiles a program of package shaderir into Go closures, which compute what the GPU renderers' code computes, within the rounding of their floats.
Package interp runs shaders on the CPU, for Golet's CPU renderer: it compiles a program of package shaderir into Go closures, which compute what the GPU renderers' code computes, within the rounding of their floats.
internal/surface
Package surface connects the content of a window that Golet draws itself (package ui) to the window (package golet), without either importing the other's internals.
Package surface connects the content of a window that Golet draws itself (package ui) to the window (package golet), without either importing the other's internals.
internal/svg
Package svg parses SVG documents and draws them into pixels, for the icons and pictures of package ui, in Go alone.
Package svg parses SVG documents and draws them into pixels, for the icons and pictures of package ui, in Go alone.
internal/text
Package text lays out text and rasterizes glyphs with the system's own text stack: DirectWrite on Windows, Core Text on macOS and Pango with cairo on Linux.
Package text lays out text and rasterizes glyphs with the system's own text stack: DirectWrite on Windows, Core Text on macOS and Pango with cairo on Linux.
internal/tsgen
Package tsgen generates a typed TypeScript client for Go services bound with golet.Bind and events declared with golet.NewEvent.
Package tsgen generates a typed TypeScript client for Go services bound with golet.Bind and events declared with golet.NewEvent.
internal/tsgen/internal/fixture
Package fixture declares types used to test the TypeScript generator.
Package fixture declares types used to test the TypeScript generator.
internal/uigen command
Command uigen generates the checked public UI facade from the private renderer API.
Command uigen generates the checked public UI facade from the private renderer API.
internal/uimigrate
Package uimigrate migrates source syntax to the UI's checked value API.
Package uimigrate migrates source syntax to the UI's checked value API.
internal/uivet
Package uivet checks native UI build lifetimes using Go type information.
Package uivet checks native UI build lifetimes using Go type information.
internal/unsupported
Package unsupported is the backend for platforms without a native implementation.
Package unsupported is the backend for platforms without a native implementation.
internal/update
Package update holds what the updater of package golet and `golet build` share: the update manifest, signatures, versions, and the formats of archives and delta updates.
Package update holds what the updater of package golet and `golet build` share: the update manifest, signatures, versions, and the formats of archives and delta updates.
internal/vec
Package vec rasterizes vector paths (lines, quadratic and cubic Bézier curves) into anti-aliased coverage masks, with the signed area accumulation of font-rs: every edge adds the area it covers to the cells it crosses, and a running sum along each row gives the coverage.
Package vec rasterizes vector paths (lines, quadratic and cubic Bézier curves) into anti-aliased coverage masks, with the signed area accumulation of font-rs: every edge adds the area it covers to the cells it crosses, and a running sum along each row gives the coverage.
internal/wait
Package wait is how Golet's tests wait for what happens elsewhere: on the main thread, in another goroutine or process, in the window system or the file system.
Package wait is how Golet's tests wait for what happens elsewhere: on the main thread, in another goroutine or process, in the window system or the file system.
internal/watchdriver
Package watchdriver runs the native file watchers of the backends on one goroutine each: the goroutine owns the system's handles, adds and removes targets between waits, and reports what the system tells it.
Package watchdriver runs the native file watchers of the backends on one goroutine each: the goroutine owns the system's handles, adds and removes targets between waits, and reports what the system tells it.
internal/web
Package web is the backend for browsers (GOOS=js, GOARCH=wasm): windows showing content Golet draws itself (package ui) on canvases of the page, drawn with WebGL 2 by the GL renderer (package gl), or in memory where the browser has no WebGL 2.
Package web is the backend for browsers (GOOS=js, GOARCH=wasm): windows showing content Golet draws itself (package ui) on canvases of the page, drawn with WebGL 2 by the GL renderer (package gl), or in memory where the browser has no WebGL 2.
internal/webview2
Package webview2 finds the Microsoft Edge WebView2 Runtime as WebView2Loader.dll does.
Package webview2 finds the Microsoft Edge WebView2 Runtime as WebView2Loader.dll does.
internal/windows
Package windows implements the Golet backend for Windows: Win32 windows hosting WebView2, called through the syscall package (no cgo).
Package windows implements the Golet backend for Windows: Win32 windows hosting WebView2, called through the syscall package (no cgo).
locales/zh-Hans
Package zhhans translates Golet's own strings, those of its controls, dialogs and menus, to 简体中文 (zh-Hans), for apps that ship that language.
Package zhhans translates Golet's own strings, those of its controls, dialogs and menus, to 简体中文 (zh-Hans), for apps that ship that language.
locales/zh-Hant
Package zhhant translates Golet's own strings, those of its controls, dialogs and menus, to 繁體中文 (zh-Hant), for apps that ship that language.
Package zhhant translates Golet's own strings, those of its controls, dialogs and menus, to 繁體中文 (zh-Hant), for apps that ship that language.
plugins/fetch
Package fetch is the fetch plugin of Golet: pages make HTTP requests from Go with the fetch of its JavaScript package, @golet-plugins/fetch, which takes and returns the standard Request options and Response.
Package fetch is the fetch plugin of Golet: pages make HTTP requests from Go with the fetch of its JavaScript package, @golet-plugins/fetch, which takes and returns the standard Request options and Response.
plugins/game
Package game has what games need beyond what apps do, opt-in, out of Golet's core ui: a game loop that updates a world in fixed steps with the player's input and draws it every frame (View), and a camera that looks at a 2D world (Camera), shown pixel-perfect at any size through a ui.Canvas (IntegerFit).
Package game has what games need beyond what apps do, opt-in, out of Golet's core ui: a game loop that updates a world in fixed steps with the player's input and draws it every frame (View), and a camera that looks at a 2D world (Camera), shown pixel-perfect at any size through a ui.Canvas (IntegerFit).
plugins/game/gamepad
Package gamepad reads game controllers: their buttons, triggers and sticks in the standard layout of an Xbox controller, which the W3C's Gamepad API and SDL's game controller database name, whatever pad it is:
Package gamepad reads game controllers: their buttons, triggers and sticks in the standard layout of an Xbox controller, which the W3C's Gamepad API and SDL's game controller database name, whatever pad it is:
plugins/glass
Package glass draws Liquid Glass in native UI, as macOS 26 and later draw it (AppKit's NSGlassEffectView), on every platform: what the elements under it painted shows through, blurred, bent near its edges as through the rim of a lens, and lit along its hairline rim.
Package glass draws Liquid Glass in native UI, as macOS 26 and later draw it (AppKit's NSGlassEffectView), on every platform: what the elements under it painted shows through, blurred, bent near its edges as through the rim of a lens, and lit along its hairline rim.
plugins/glass/internal/gen command
Command gen compiles the glass's and the blur's shaders ahead of time, so that renderers start without compiling them: the Metal libraries on macOS, with Xcode's metal tools, into shaders_darwin.go, and the Direct3D bytecode on Windows, with the system's d3dcompiler_47.dll, into shaders_windows.go.
Command gen compiles the glass's and the blur's shaders ahead of time, so that renderers start without compiling them: the Metal libraries on macOS, with Xcode's metal tools, into shaders_darwin.go, and the Direct3D bytecode on Windows, with the system's d3dcompiler_47.dll, into shaders_windows.go.
plugins/loading
Package loading has the 29 loading indicators of loading.dev (https://loading.dev, Jakub Krehel's loading-dev for React) for native UI: arcs, dots, bars and blocks that Golet draws itself, each a ui element that moves as long as it shows.
Package loading has the 29 loading indicators of loading.dev (https://loading.dev, Jakub Krehel's loading-dev for React) for native UI: arcs, dots, bars and blocks that Golet draws itself, each a ui element that moves as long as it shows.
plugins/sqlite
Package sqlite is Golet's SQLite plugin.
Package sqlite is Golet's SQLite plugin.
plugins/sqlite/internal/libbuild command
Builds SQLite's C amalgamation and the plugin's C shim with Zig 0.16:
Builds SQLite's C amalgamation and the plugin's C shim with Zig 0.16:
plugins/terminal
Package terminal is a terminal for Golet's native UI: a view that runs a shell, or any program, in a pseudo-terminal, with the terminal emulator of Ghostty, libghostty-vt, and draws it with package ui.
Package terminal is a terminal for Golet's native UI: a view that runs a shell, or any program, in a pseudo-terminal, with the terminal emulator of Ghostty, libghostty-vt, and draws it with package ui.
plugins/terminal/internal/libbuild command
Libbuild builds libghostty-vt for every platform Golet supports from Ghostty's sources at a commit, with Zig (the version Ghostty asks for), and writes golet-plugin.json, which names the files and their SHA-256 for the CLI and the terminal package, and ghostty_themes.go, the themes that Ghostty ships:
Libbuild builds libghostty-vt for every platform Golet supports from Ghostty's sources at a commit, with Zig (the version Ghostty asks for), and writes golet-plugin.json, which names the files and their SHA-256 for the CLI and the terminal package, and ghostty_themes.go, the themes that Ghostty ships:
plugins/terminal/internal/library
Package library finds libghostty-vt for the terminal plugin: next to the app, in the user's cache, or downloaded there, as golet-plugin.json names it.
Package library finds libghostty-vt for the terminal plugin: next to the app, in the user's cache, or downloaded there, as golet-plugin.json names it.
plugins/terminal/internal/pty
Package pty runs processes in pseudo-terminals, in pure Go: /dev/ptmx on macOS and Linux, ConPTY on Windows.
Package pty runs processes in pseudo-terminals, in pure Go: /dev/ptmx on macOS and Linux, ConPTY on Windows.
plugins/terminal/internal/vt
Package vt binds libghostty-vt, the terminal emulator of Ghostty, which it loads at run time through purego: no cgo.
Package vt binds libghostty-vt, the terminal emulator of Ghostty, which it loads at run time through purego: no cgo.
plugins/updater
Package updater is the update window of Golet apps, in the manner of Sparkle on macOS.
Package updater is the update window of Golet apps, in the manner of Sparkle on macOS.
plugins/updater/internal/frontend
Package frontend is what the updater shares with the windows that show its sessions: package updater shows them in a web page, package native in native UI.
Package frontend is what the updater shares with the windows that show its sessions: package updater shows them in a web page, package native in native UI.
plugins/updater/internal/markdown
Package markdown parses the release notes of the update window.
Package markdown parses the release notes of the update window.
plugins/updater/native
Package native is the update window of package updater drawn in native UI (package ui) instead of a web page, for apps whose windows all show native UI: it needs no webview, so neither WebKitGTK on Linux nor the WebView2 Runtime on Windows.
Package native is the update window of package updater drawn in native UI (package ui) instead of a web page, for apps whose windows all show native UI: it needs no webview, so neither WebKitGTK on Linux nor the WebView2 Runtime on Windows.
plugins/watch
Package watch is the watch plugin of Golet: it lets pages watch for changes to the files and directories the app names (see @golet-plugins/watch).
Package watch is the watch plugin of Golet: it lets pages watch for changes to the files and directories the app names (see @golet-plugins/watch).
plugins/websocket
Package websocket is the WebSocket plugin of Golet: pages open WebSocket connections from Go with the WebSocket class of its JavaScript package, @golet-plugins/websocket, which has the API of the browser's.
Package websocket is the WebSocket plugin of Golet: pages open WebSocket connections from Go with the WebSocket class of its JavaScript package, @golet-plugins/websocket, which has the API of the browser's.
transfer
Package transfer describes data exchanged through the clipboard and native drag and drop.
Package transfer describes data exchanged through the clipboard and native drag and drop.
ui
Package ui builds user interfaces that Golet draws itself, on the GPU where it can, for windows that show no web page:
Package ui builds user interfaces that Golet draws itself, on the GPU where it can, for windows that show no web page:
ui/chart
Package chart builds charts in native UI without a look of their own, as headless libraries do on the web: scales that map data onto a plot and pick round ticks, a plot with axes around it, marks that are elements you style as any other, paths of lines, areas and pie slices for Draw functions, stacking, and a selection that the pointer and the keyboard move.
Package chart builds charts in native UI without a look of their own, as headless libraries do on the web: scales that map data onto a plot and pick round ticks, a plot with axes around it, marks that are elements you style as any other, paths of lines, areas and pie slices for Draw functions, stacking, and a selection that the pointer and the keyboard move.
ui/editor
Package editor is a code editor and a diff viewer for Golet's native UI, on package ui.
Package editor is a code editor and a diff viewer for Golet's native UI, on package ui.
ui/shader
Package shader draws with shaders an app writes: fragment shaders in Go's syntax, which run on the GPU, whichever renderer draws the window (Metal, Direct3D 11, OpenGL or WebGL 2), and on the CPU where none can.
Package shader draws with shaders an app writes: fragment shaders in Go's syntax, which run on the GPU, whichever renderer draws the window (Metal, Direct3D 11, OpenGL or WebGL 2), and on the CPU where none can.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL