2026-06-26 06:03:22 +02:00
2026-06-26 06:41:22 +02:00
2026-06-28 00:11:53 +02:00
2026-06-26 06:53:38 +02:00
2026-06-23 14:41:39 +02:00
2026-06-23 14:41:39 +02:00
2026-06-23 14:41:39 +02:00
2026-06-26 06:40:52 +02:00
2026-06-28 00:11:53 +02:00

iroh-go

Warning

Highly Experimental ™️

Go FFI bindings for iroh via iroh-ffi.

Motivation

The goal is to provide, as far as possible, seamless "just go build it" support for Go iroh hackers without requiring them to deal with shared libraries, the Rust toolchain or a deepdive in how FFI works. The current approach is to embed libiroh as a staticlib built with Rust for each platform. We use musl to avoid glibc incompatibilities on different linux systems. It's then possible to build a static binary with go build or with Zig. iroh-go does require CGO_ENABLED=1.

Platform support

  • x86_64-unknown-linux-musl
  • aarch64-unknown-linux-musl

Documentation

See docs.rs for the original Rust API documentation. The exposed Go API is 1:1. Here's the Go bindings documentation on godocs.io.

Examples

See examples.

Generate bindings

See iroh-go for the Rust toolchain configuration. Run ./scripts/generate.sh to build a new set of libraries which end up vendored in libs.

Known issues

  • We need to patch the upstream iroh-ffi endpoint.rs to fix an incompatibility with uniffi-bindgen-go. See this commit for more.
  • We need to patch the upstream iroh-ffi Cargo.toml to remove the crate-type configuration when runnings builds here. See this commit for more.

Licenses

Apache 2.0 & MIT, following the upstream licensing choices in iroh-ffi.

S
Description
Go FFI bindings for iroh
https://iroh.computer
Readme 29 MiB
Languages
Go 72%
C 27.6%
Shell 0.4%