https://github.com/ndimensional/zig-ultralight
Zig bindings for Ultralight
https://github.com/ndimensional/zig-ultralight
Last synced: 12 months ago
JSON representation
Zig bindings for Ultralight
- Host: GitHub
- URL: https://github.com/ndimensional/zig-ultralight
- Owner: nDimensional
- License: mit
- Created: 2024-01-29T22:15:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-26T01:00:28.000Z (about 1 year ago)
- Last Synced: 2025-04-26T02:29:17.083Z (about 1 year ago)
- Language: Zig
- Size: 61.5 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zig-ultralight
Zig bindings for [Ultralight](https://ultralig.ht/), an embedded high-performance HTML renderer.
Built and tested with Zig version `0.14.0`.
## Usage
First, [download the Ultralight v1.4.0 SDK](https://ultralig.ht/download) for your platform.
Then, add zig-ultralight to `build.zig.zon`:
```
.{
.dependencies = .{
.ultralight = .{
.url = "https://github.com/nDimensional/zig-ultralight/archive/$COMMIT.tar.gz",
// .hash = "...",
},
},
}
```
Then add the `ul` import to your root modules in `build.zig`, passing the path to the Ultralight SDK as a build argument:
```zig
const ultralight = b.dependency("ultralight", .{
.SDK = @as([]const u8, "path/to/sdk/folder"),
});
app.root_module.addImport("ul", ultralight.module("ul"));
```
To run the example [example](example.zig), pass the SDK path in usind `-DSDK` from the CLI:
```
$ zig build run -DSDK=path/to/sdk/folder
```