keylib icon indicating copy to clipboard operation
keylib copied to clipboard

Feat/add c bindings

Open pando85 opened this issue 1 month ago • 1 comments

Hello there,

First of all, thank you for this implementation — it’s great to see projects like this in the Zig ecosystem.

I’m currently building Rust bindings for keylib and added C bindings to expose the full functionality of the library. My goal is to make it possible to use the entire keylib API from Rust, while implementing some components natively in Rust for better integration.

I understand that maintaining these bindings can be challenging, but I’ve set up a separate package where I’m implementing end-to-end tests that validate the WebAuthn flow against a real authenticator using these bindings from Rust.

pando85 avatar Nov 09 '25 13:11 pando85

Linked to #29

pando85 avatar Nov 09 '25 15:11 pando85

Thanks for the PR!

First of all sorry that I haven't replied sooner. Since I moved the project to Zig-Sec I don't get notified automatically.

I'll read through the commits in the following days.

r4gus avatar Nov 19 '25 16:11 r4gus

To be honest, I tried to make something work and the implementation was a bit chaotic. I'm new to Zig and didn't want to touch the library itself, just the bindings, and I feel like I'm reimplementing a lot of things.

I did more changes in my main branch and finally get something fully functional but I don't know if it will worth to you. At the end I'm moving to a pure Rust implementation, based on your library and heavily inspired by it.

If something that I did is useful for this project, I will be happy, but I'm unsure. The library which used these changes is here: https://github.com/pando85/rust-keylib

pando85 avatar Nov 19 '25 19:11 pando85