Thanks for helping improve zero-native. This guide is for maintainers and contributors working on the framework repository itself.
For app author documentation, start at zero-native.dev.
- Zig 0.16.0+
- Node.js with npm for the CLI package and generated frontend projects
- pnpm for the documentation site
- macOS for WKWebView and Chromium/CEF development
- Linux with GTK4 and WebKitGTK 6 for Linux system WebView development
Run the framework tests:
zig build testValidate the sample app manifest:
zig build validateBuild the WebView example against the system engine:
zig build test-webview-system-linkRun the WebView example:
zig build run-webviewCheck the npm CLI package:
npm --prefix packages/zero-native run version:check
npm --prefix packages/zero-native run scripts:checkCheck the documentation site:
pnpm --dir docs install --frozen-lockfile
pnpm --dir docs checkThe system WebView path is the default development loop:
zig build run-webview -Dweb-engine=systemFor Chromium on macOS, install CEF and run with the Chromium engine:
zero-native cef install
zig build run-webview -Dweb-engine=chromiumUseful Chromium smoke checks:
zig build test-webview-cef-smoke -Dplatform=macos -Dweb-engine=chromium
zig build test-package-cef-layout -Dplatform=macosCreate a local package artifact:
zig build packagePackage explicitly through the CLI:
zero-native package --target macos --manifest app.zon --assets assets --binary zig-out/lib/libzero-native.aFor Chromium packages, configure .web_engine = "chromium" and .cef in app.zon, or use temporary --web-engine and --cef-dir overrides while testing.
Enable automation in a build:
zig build run-webview -Dautomation=trueInteract with the running app:
zero-native automate wait
zero-native automate list
zero-native automate bridge '{"id":"ping","command":"native.ping","payload":null}'Automation writes artifacts under .zig-cache/zero-native-automation.
Thank you for your contribution! Please follow these steps to ensure a smooth review process:
- Fork the repository and create a new branch for your feature or bug fix.
- Make your changes and commit them with clear, descriptive messages.
- Push your branch to your forked repository.
- Open a pull request against the main repository's
mainbranch.
Please ensure to sign your commits. If you don't know what that means, you can read about it in the Git documentation.