Home

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

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

License

This repo is released under the MIT License.

Third party code: