Awesome
webview-zig
Zig binding for a tiny cross-platform webview library to build modern cross-platform GUIs.
<p align="center"> <img src="https://raw.githubusercontent.com/thechampagne/webview-zig/main/.github/assets/screenshot.png"/> </p>Requirements
- Zig Compiler - 0.12.0
- Unix
- Windows
- macOS
Usage
Auto
zig fetch --save https://github.com/thechampagne/webview-zig/archive/refs/heads/main.tar.gz
Manual
build.zig.zon
:
.{
.dependencies = .{
.webview = .{
.url = "https://github.com/thechampagne/webview-zig/archive/refs/heads/main.tar.gz" ,
//.hash = "12208586373679a455aa8ef874112c93c1613196f60137878d90ce9d2ae8fb9cd511",
},
},
}
build.zig
:
const webview = b.dependency("webview", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("webview", webview.module("webview"));
exe.linkLibrary(webview.artifact("webviewStatic")); // or "webviewShared" for shared library
// exe.linkSystemLibrary("webview"); to link with installed prebuilt library without building
References
- webview - 0.10.0
License
This repo is released under the MIT License.
Third party code:
- external/webview licensed under the MIT License.
- external/WebView2 licensed under the BSD-3-Clause License.