No description
  • Scheme 85.7%
  • Tree-sitter Query 7.4%
  • Shell 2.8%
  • Makefile 2%
  • Python 1.1%
  • Other 1%
Find a file
Giacomo Leidi 2b7b22997d
doc: Give the manual its own stylesheet.
The manual used to be styled by Guix' manual.css.  It now carries
its own theme layered on top of Guix' gnu.css, with its own palette,
dark mode and syntax highlighting colors.  The vendored fonts are
reduced to Fira Sans and compressed to WOFF2, roughly 70% smaller than
the TTF files they replace.

* Makefile.am: Regenerate.
* doc/css/iroh.css: New file.
* doc/guile-iroh.texi: Clarify the build instructions and the Fibers
example.
* doc/guix-theme/css/manual.css: Delete file.
* doc/guix-theme/fonts/FiraSans-Bold.woff2,
doc/guix-theme/fonts/FiraSans-BoldItalic.woff2,
doc/guix-theme/fonts/FiraSans-Italic.woff2,
doc/guix-theme/fonts/FiraSans-Regular.woff2: New files.
* doc/guix-theme/fonts/FiraSans-Bold.ttf,
doc/guix-theme/fonts/FiraSans-Regular.ttf,
doc/guix-theme/fonts/LinLibertine_R.ttf,
doc/guix-theme/fonts/LinLibertine_RB.ttf,
doc/guix-theme/fonts/LinLibertine_RBI.ttf,
doc/guix-theme/fonts/LinLibertine_RI.ttf: Delete files.
* hall.scm: Add doc/css.
* scripts/download-guix-css.sh: Stop fetching manual.css and the Linux
Libertine fonts, fetch the Fira Sans italics and compress them to
WOFF2.
* scripts/hall_refresh.sh: Reference gnu.css and doc/css/iroh.css
instead of manual.css, and distribute the latter.
* scripts/publish_manual.sh: Publish doc/css.
* scripts/ttf2woff2.py: New file.
2026-08-12 22:26:25 +02:00
.guix/modules Release 0.2.0. 2026-08-12 20:36:53 +02:00
build-aux Init build system. 2026-07-27 20:58:27 +02:00
doc doc: Give the manual its own stylesheet. 2026-08-12 22:26:25 +02:00
examples Switch to iroh-c-ffi. 2026-08-12 20:35:50 +02:00
iroh Switch to iroh-c-ffi. 2026-08-12 20:35:50 +02:00
scripts doc: Give the manual its own stylesheet. 2026-08-12 22:26:25 +02:00
.envrc Init build system. 2026-07-27 20:58:27 +02:00
.gitignore Update manual with new DHT address lookup example. 2026-07-28 23:17:22 +02:00
.guix-authorizations Init Guix channel. 2026-07-26 23:01:00 +02:00
.guix-channel Init Guix channel. 2026-07-26 23:01:00 +02:00
configure.ac Release 0.2.0. 2026-08-12 20:36:53 +02:00
COPYING Init. 2026-07-26 23:00:59 +02:00
guix.scm Add guix.scm symlink. 2026-07-26 23:01:00 +02:00
hall.scm doc: Give the manual its own stylesheet. 2026-08-12 22:26:25 +02:00
iroh.scm Switch to iroh-c-ffi. 2026-08-12 20:35:50 +02:00
Makefile.am doc: Give the manual its own stylesheet. 2026-08-12 22:26:25 +02:00
manifest.scm Switch to iroh-c-ffi. 2026-08-12 20:35:50 +02:00
pre-inst-env.in Init build system. 2026-07-27 20:58:27 +02:00
README.md Switch to iroh-c-ffi. 2026-08-12 20:35:50 +02:00

guile-iroh

GNU Guile FFI bindings for iroh, a peer-to-peer networking library.

guile-iroh exposes synchronous iroh primitives like endpoints, connections and bidirectional streams as Guile procedures.

Architecture

iroh is written in Rust and its API is asynchronous (it needs a tokio runtime), so it exposes no C ABI that Guile can call directly. guile-iroh binds iroh-c-ffi, iroh's official C FFI. The Guile modules under iroh/ dynamically link it. Every operation is synchronous and blocks the calling thread.

Building guile-iroh

The easiest way is through Guix:

guix build -L $(pwd)/.guix/modules -f guix.scm 

otherwise you'll need Rust and C toolchains to build the libiroh_c_ffi.so shared library, and a Guile runtime to build the Guile code. Start by building the library:

# Clone and build iroh-c-ffi (set CC to your C compiler).
git clone https://github.com/n0-computer/iroh-c-ffi
CC=gcc cargo build --manifest-path iroh-c-ffi/Cargo.toml --release --lib
ls -l iroh-c-ffi/target/release/libiroh_c_ffi.so

next build the Guile code, pointing it at the .so (without the .so extension):

export GUILE_IROH_SOFILE_DEV="$(pwd)/iroh-c-ffi/target/release/libiroh_c_ffi"
# The usual dance
autoreconf -vif && ./configure && make

Documentation

You can find the official manual on Codeberg Pages.

Guix channel

To configure Guix for using this repository as a channel, you need to create a .config/guix/channels.scm file with the following content:

(cons* (channel
        (name 'guile-iroh)
        (url "https://codeberg.org/fishinthecalculator/guile-iroh.git")
        (branch "main")
        ;; Enable signature verification:
        (introduction
         (make-channel-introduction
          "bbc7a09674789b1d8bfd73844754acc8a97fad01"
          (openpgp-fingerprint
           "50E1 7BE0 D210 C883 D675  3150 4A3D 07EF D05C 4045"))))
       %default-channels)

What is a Guix channel?

A channel is roughly the Guix equivalent of the AUR or container registries. It's a software repository providing Guix package and service definitions.

Contributing

All contributions are welcome. If you have commit access please remember to setup the authentication hook with

guix git authenticate bbc7a09674789b1d8bfd73844754acc8a97fad01 "50E1 7BE0 D210 C883 D675  3150 4A3D 07EF D05C 4045"

Building the manual

# Build the HTML manual
make html

Licence

Unless otherwise stated all the files in this repository are to be considered under the GPL 3.0 terms. You are more than welcome to open issues or send patches.