Zellij plugins in Zig!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LordMZTE 4bcc881651
fix: add now required -rdynamic compiler option to example
3 months ago
example fix: add now required -rdynamic compiler option to example 3 months ago
src feat: added error context and upgraded zellij API 3 months ago
.gitignore Initial Commit! 10 months ago
LICENSE chore: add GPL-3 license 10 months ago
README.md feat: change event system 7 months ago
build.zig docs: improve documentation 7 months ago
gyro.zzz deps: update getty and getty-json 3 months ago

README.md

zellzig

A zig framework for writing zellij plugins.

Zellzig is currently used by these project (if you use this library, please submit a PR!):

usage

For an example of how to use it, see the example directory. Also note that you'll need a master version of the zig compiler to use zellzig.

Here's a quick overview:

const std = @import("std");
const zz = @import("zellzig");

comptime {
    // register plugin
    zz.createPlugin(@This());
}

pub fn init() void {
    // do initialization stuff
}

pub fn update() void {
    var event = zz.getEvent(my_allocator) catch return;
    defer event.deinit();
    // handle events
}

pub fn render(rows: i32, cols: i32) void {
    // draw UI
}

development

PRs are always welcome if you feel that something needs improvement/fixing! Make sure to follow Conventional Commits and to run tests first, though.

Run tests using gyro build test. Note that tests are run on the native target, not WASM.

Documentation may be generated by running gyro build -Ddocs.