Skip to content

allyourcodebase/libuv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libuv

This is libuv, packaged for Zig.

Status

In theory, the full intersection of platforms supported by libuv and platforms supported by Zig are supported build targets, but the less common targets are not tested.

Building the unit test executable for linux (and possibly other platforms) does not currently work because the unit test files directly #include some of the libuv source files (while also linking to libuv.a), and that causes duplicate symbol errors unless the linker command is assembled in a specific order. The zig build system does not enforce a specific order.

Usage

First, update your build.zig.zon:

# Initialize a zig project if you haven't already
zig init
# replace <refname> with the version you want to use, e.g. 1.50.0
zig fetch --save git+https://github.com/allyourcodebase/libuv.git#<refname>

You can then import libuv in your build.zig with:

const libuv_dep = b.dependency("libuv", .{
    .target = target,
    .optimize = optimize,
});
your_exe.linkLibrary(libuv_dep.artifact("uv"));

Dependencies

libuv only depends on core operating system libraries (and libc).

Zig Version Support Matrix

Refname libuv Version Compatible Zig Version(s)
v1.50.0 1.50.0 0.14.0, 0.15.0-dev
main 1.51.0 0.14.0, 0.15.0-dev

About

libuv with the zig build system

Resources

License

ISC, MIT licenses found

Licenses found

ISC
LICENSE
MIT
LICENSE-LIBUV

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages