SHA256
Watch
1
0
Fork
You've already forked hidapi
0
mirror of https://codeberg.org/r4gus/hidapi.git synced 2026-11-17 03:20:32 +00:00
hidapi ported to the Zig build system
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-11 01:03:26 +02:00
.gitignore updated build.zig to work with Zig 0.16.0 2026-04-17 19:43:26 +02:00
build.zig link agains udev instead of libudev 2026-07-23 23:28:58 +02:00
build.zig.zon removed src folder from paths list 2026-10-11 01:03:26 +02:00
LICENSE Initial commit 2025-12-24 23:49:01 +01:00
README.md first release 0.1.0 2025-12-25 01:24:08 +01:00

hidapi

hidapi ported to the Zig build system

Getting Started

First add the package to your dependencies:

# Replace <VERSION TAG> with the version you want to use
zig fetch --save https://codeberg.org/r4gus/hidapi/archive/<VERSION TAG>.tar.gz
# e.g., zig fetch --save https://codeberg.org/r4gus/hidapi/archive/0.1.0.tar.gz

Then access the hidapi dependency within your build.zig:

# access the hidapi dependency
const hidapi_dep = b.dependency("hidapi", .{
    .target = target,
    .optimize = optimize,
});

# then link it with the module that uses hidapi
my_mod.linkLibrary(hidapi_dep.artifact("hidapi"));

Now you can @import("hidapi") within your code to use the library.

LICENSE

This repository is licensed under MIT. The hidapi code build using this library is licensed under one of three licenses:

  • GPL3
  • BSD-Style License
  • HIDAPI license