A Zig library for talking to USB and Bluetooth HID devices on Linux, FreeBSD, Windows and macOS, without linking the C hidapi

use the Init parameter of main in the enumerate example

Zig 0.16 lets main take a std.process.Init, in which case the runtime builds the allocator and the Io implementation and passes them in. That removes ten lines of DebugAllocator and Io.Threaded scaffolding from the example, along with the chance of getting its teardown order wrong. The prose above the example claimed the examples use Io.Threaded, which is no longer true, so it now explains init.io as the easy way to obtain an Io and notes that constructing one by hand is what a library caller needs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SbEyBWpAnyGNMQTNWADqDB


Author jcollie.dev
Co-author Claude Opus 5 (1M context) Date Commit Parent 7dadc4d8
+8 -9
1 changed file
+8 -9
1 changed file