Skip to content

Latest commit

 

History

History
 
 

zglfw

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

zglfw v0.6.0 - GLFW bindings

Getting started

Copy zglfw and system-sdk folders to a libs subdirectory of the root of your project.

Then in your build.zig add:

const zglfw = @import("libs/zglfw/build.zig");

pub fn build(b: *std.Build) void {
    ...
    const optimize = b.standardOptimizeOption(.{});
    const target = b.standardTargetOptions(.{});

    const zglfw_pkg = zglfw.package(b, target, optimize, .{});

    zglfw_pkg.link(exe);
}

Now in your code you may import and use zglfw:

const zglfw = @import("zglfw");

pub fn main() !void {
    ...
}