Closed chiumichael closed 8 months ago
I don't think this is necessary? Pretty sure the existing build.zig
is all that's needed.
In your own project, you'll need a build.zig.zon
with this entry:
.websocket = .{
.url = "https://github.com/karlseguin/websocket.zig/archive/2717469d68bf90d513f7250c37a56adf9756a4e1.tar.gz",
.hash = "1220d88669d3548a74996facc403f8fbefc9b2e2d38a0595c15d08f97bcdc337d268"
}
And in your build.zig
, you can get the websocket module via:
const dep_opts = .{.target = target, .optimize = optimize};
const ws_module = b.dependency("websocket", dep_opts).module("websocket");
hrmm you're right. that's neat.
I think adding a build.zig.zon
file would still be useful as it allows for better integration with zig fetch
and zls completions
Adds a simple
build.zig.zon
file that enables zig package manager support thereby avoiding the need for git submodules