Positron
A web renderer frontend for zig applications
Install / Use
/learn @ziglibs/PositronREADME
⚛️ Positron
A Zig binding to the webview library. Make Zig applications with a nice HTML5 frontend a reality!

Usage
//! src/minimal.zig
const std = @import("std");
const wv = @import("positron");
pub fn main() !void {
const view = try wv.View.create(false, null);
defer view.destroy();
view.setTitle("Webview Example");
view.setSize(480, 320, .none);
view.navigate("https://ziglang.org");
view.run();
}
//! build.zig
const std = @import("std");
const pkgs = @import(".zpm/pkgs.zig");
const Sdk = @import("Sdk.zig");
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("demo", "src/minimal.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
// Add and link the package.
exe.addPackage(Sdk.getPackage("positron"));
Sdk.linkPositron(exe, null);
exe.install();
}
Example
The example is a small, two-view chat application that transfers data bidirectionally between backend and frontend.
Log in with ziggy/love and you can send messages, no real server there though!
You can build the example with zig build and run it with zig build run.
Building
Linux
Install gtk-3 and webkit2gtk, then invoke zig build.
Windows
Download Edge Dev Channel, then invoke zig build.
MacOS
No research was done for the support on MacOS. Try with zig build.
Contributing
This library is in a early state and is very WIP. Still, feel free to contribute with PRs, or use it. Just don't assume a stable API.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
