I briefly describe how wrapping C libraries works in zig and provide a complete (single file) zig wrapper for pcre2.
Reply on news.ycombinator.com