Building¶
Requirements¶
- Zig 0.15.2+
- macOS 13+ or Linux
Static Library¶
This produces zig-out/lib/libctap2.a with the C header at include/ctap2.h.
With just¶
just build # ReleaseFast static library
just test-all # unit + PBT tests
just info # show library stats
just # list all recipes
With Nix¶
Running Tests¶
# Unit tests (no hardware required)
zig build test
# Property-based tests (1000 iterations each)
zig build test-pbt
# Hardware tests (requires YubiKey connected)
YUBIKEY_TESTS=1 zig build test-hardware
Cross-Compilation¶
The library supports cross-compilation to any Zig target. IOKit and CoreFoundation frameworks are not linked at build time -- they resolve at final link time in the consuming application (e.g., via Xcode OTHER_LDFLAGS).
macOS Entitlements¶
When embedding in a hardened-runtime macOS app, add to your entitlements:
The user must grant Input Monitoring permission in System Settings > Privacy & Security.
No other entitlements needed -- no com.apple.developer.web-browser.public-key-credential, no provisioning profile.