feat: use zig-glib-log

This commit is contained in:
LordMZTE 2022-07-18 17:48:47 +02:00
parent 4a54643e52
commit 7647f569e4
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
5 changed files with 15 additions and 1 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
zig-*
.gyro
gyro.lock
deps.zig

View File

@ -8,8 +8,9 @@ Requirements:
- a master build of the zig compiler
- rofi and it's dependencies
- `gdbus-codegen`
- [gyro](https://github.com/mattnite/gyro)
```bash
zig build -Drelease fast
gyro build -Drelease fast
```
Find the artifacts in `zig-out/lib`.

View File

@ -1,4 +1,5 @@
const std = @import("std");
const pkgs = @import("deps.zig").pkgs;
pub fn build(b: *std.build.Builder) !void {
// Standard release options allow the person running `zig build` to select
@ -13,6 +14,7 @@ pub fn build(b: *std.build.Builder) !void {
lib.linkSystemLibrary("gio-unix-2.0");
lib.linkSystemLibrary("rofi");
lib.linkSystemLibrary("cairo");
pkgs.addAllTo(lib);
lib.install();

6
gyro.zzz Normal file
View File

@ -0,0 +1,6 @@
deps:
glib-log:
git:
url: "https://mzte.de/git/LordMZTE/zig-glib-log.git"
ref: master
root: src/main.zig

View File

@ -3,6 +3,8 @@ const ffi = @import("ffi.zig");
const c = ffi.c;
const Mode = c.Mode;
pub const log = @import("glib-log").log(c, "rofi-nheko", 512);
export var mode: Mode = .{
.abi_version = c.ABI_VERSION,