Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thechampagne/webview-zig
⚡ Zig binding & wrapper for a tiny cross-platform webview library to build modern cross-platform GUIs.
https://github.com/thechampagne/webview-zig
library webview zig zig-package ziglang
Last synced: 3 days ago
JSON representation
⚡ Zig binding & wrapper for a tiny cross-platform webview library to build modern cross-platform GUIs.
- Host: GitHub
- URL: https://github.com/thechampagne/webview-zig
- Owner: thechampagne
- License: mit
- Created: 2023-09-01T13:17:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-18T09:47:26.000Z (5 months ago)
- Last Synced: 2024-12-31T00:09:20.124Z (10 days ago)
- Topics: library, webview, zig, zig-package, ziglang
- Language: Zig
- Homepage:
- Size: 421 KB
- Stars: 87
- Watchers: 2
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webview-zig
[![](https://img.shields.io/github/v/tag/thechampagne/webview-zig?label=version)](https://github.com/thechampagne/webview-zig/releases/latest) [![](https://img.shields.io/github/license/thechampagne/webview-zig)](https://github.com/thechampagne/webview-zig/blob/main/LICENSE)
Zig binding for a tiny cross-platform **webview** library to build modern cross-platform GUIs.
### Requirements
- [Zig Compiler](https://ziglang.org/) - **0.12.0**
- Unix
- [GTK3](https://gtk.org/) and [WebKitGTK](https://webkitgtk.org/)
- Windows
- [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)
- macOS
- [WebKit](https://webkit.org/)### Usage
#### Auto
```
zig fetch --save https://github.com/thechampagne/webview-zig/archive/refs/heads/main.tar.gz
```
#### Manual
`build.zig.zon`:
```zig
.{
.dependencies = .{
.webview = .{
.url = "https://github.com/thechampagne/webview-zig/archive/refs/heads/main.tar.gz" ,
//.hash = "12208586373679a455aa8ef874112c93c1613196f60137878d90ce9d2ae8fb9cd511",
},
},
}
```
`build.zig`:
```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](https://github.com/webview/webview) - **0.10.0**### License
This repo is released under the [MIT License](https://github.com/thechampagne/webview-zig/blob/main/LICENSE).
Third party code:
- [external/webview](https://github.com/thechampagne/webview-zig/tree/main/external/webview) licensed under the [MIT License](https://github.com/thechampagne/webview-zig/tree/main/external/webview/LICENSE).
- [external/WebView2](https://github.com/thechampagne/webview-zig/tree/main/external/WebView2) licensed under the [BSD-3-Clause License](https://github.com/thechampagne/webview-zig/tree/main/external/WebView2/LICENSE).