| Platform | Architectures |
|---|---|
| macOS | arm64 |
| Linux | x86_64, aarch64 (glibc and musl), armv7 |
| Windows | x86_64, aarch64 |
| Android | aarch64, armv7 |
All platforms require Node.js 20.3.0 or newer.
- API reference: JavaScript API docs
- Example app: hello-iroh-ffi, a console reader for the cross-platform dot demo
- All languages: platform support matrix
The JavaScript bindings to iroh are published on npm as @number0/iroh and shipped from iroh-ffi. They’re built with napi-rs, so the package distributes prebuilt native binaries. No Rust toolchain or local compilation is needed.
Install
Requires Node.js 20.3.0 or newer. Prebuilt N-API binaries are published for:
- macOS:
arm64(no Intel build) - Linux:
x86_64andaarch64(glibc + musl),armv7(gnueabihf + musleabihf) - Windows:
x86_64andaarch64 - Android:
aarch64andarmv7
Hello, iroh
Endpoint.bind applies the n0 preset (public discovery + default relays) by default. Pass an EndpointOptions object to override the preset, supply a fixed secret key, or set ALPNs.
A two-peer echo
A minimal sender/receiver pair over a bidirectional stream:
Start the receiver in one terminal, copy the printed ticket, and run the sender with it in another.