SHA256
1
1
Fork
You've already forked hidapi
0
hidapi ported to the Zig build system
  • Zig 100%
Find a file
2026年04月18日 12:47:24 +02:00
src first release 0.1.0 2025年12月25日 01:24:08 +01:00
.gitignore updated build.zig to work with Zig 0.16.0 2026年04月17日 19:43:26 +02:00
build.zig linking against libudev. maybe this will break on non Debian based distros... 2026年04月18日 12:47:24 +02:00
build.zig.zon fixed linker bug for ubuntu 2026年03月27日 22:57:26 +01: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:

#accessthehidapidependencyconsthidapi_dep=b.dependency("hidapi",.{.target=target,.optimize=optimize,});#thenlinkitwiththemodulethatuseshidapimy_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