mirror of
https://codeberg.org/r4gus/hidapi.git
synced 2026-11-17 03:20:32 +00:00
hidapi ported to the Zig build system
- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| README.md | ||
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