- Header:
irohnet.h, checked into the repo - Examples: main.c and the multi-thread examples
- All languages: platform support matrix
iroh-c-ffi is a raw C API generated with safer-ffi — unlike the Python, Swift, Kotlin, and JavaScript bindings, it isn’t built on iroh-ffi/uniffi. There are no prebuilt binaries; you build the static/shared library from source and link against it.
Install
target/release/libiroh_c_ffi.{a,so,dylib}. The matching header is already checked in as irohnet.h; regenerate it only if you’re tracking an API change:
Hello, iroh
Next steps
main.c example
A full server/client pair: bind, accept, send, and receive over uni- and bi-directional streams.
Multi-threaded examples
multi-thread-server.c, multi-thread-client.c, and single-thread-server.c for handling concurrent connections.iroh-c-ffi repository
Source, generated header, and issue tracker for the C bindings.