A lightweight, high-performance cross-platform application framework built with Zig. It creates native desktop apps (macOS, Linux, Windows), mobile apps (iOS, Android), and menubar/system tray apps using web technologies. It includes a library of native UI components, advanced GPU rendering (Vulkan/Metal/Direct3D), WebSocket support, a JavaScript bridge, system integration (notifications, clipboard, file dialogs), and a TypeScript SDK (craft-native) for building apps without writing Zig directly. Reproducible binary-size and startup benchmarks live in benchmarks/.
- Use pickier for linting — never use eslint directly
- Run
bunx --bun pickier .to lint,bunx --bun pickier . --fixto auto-fix - When fixing unused variable warnings, prefer
// eslint-disable-next-linecomments over prefixing with_
- Use stx for templating — never write vanilla JS (
var,document._,window._) in stx templates - Use crosswind as the default CSS framework which enables standard Tailwind-like utility classes
- stx
<script>tags should only contain stx-compatible code (signals, composables, directives)
- buddy-bot handles dependency updates — not renovatebot
- better-dx provides shared dev tooling as peer dependencies — do not install its peers (e.g.,
typescript,pickier,bun-plugin-dtsx) separately ifbetter-dxis already inpackage.json - If
better-dxis inpackage.json, ensurebunfig.tomlincludeslinker = "hoisted"
- Craft is distributed through the pantry registry (
pantry install craft). The SDK and CLI both expectcraftto be on PATH and do not probezig-outpaths or any monorepo-relative locations at runtime. - The
release.ymlworkflow publishes to pantry on every tag viahome-lang/pantry/packages/action@mainwithpublish: 'zig'. - Tests / monorepo dev loop: set
CRAFT_BIN=/absolute/path/to/craftto override the PATH lookup. The SDK'sAppConfig.craftPathfield accepts the same kind of override at app-config time. - Adding new lookup paths or fallbacks to
binary-resolver.tsdefeats the pantry contract — don't.
- Use conventional commit messages (e.g.,
fix:,feat:,chore:)