- Scheme 85.7%
- Tree-sitter Query 7.4%
- Shell 2.8%
- Makefile 2%
- Python 1.1%
- Other 1%
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. |
||
|---|---|---|
| .guix/modules | ||
| build-aux | ||
| doc | ||
| examples | ||
| iroh | ||
| scripts | ||
| .envrc | ||
| .gitignore | ||
| .guix-authorizations | ||
| .guix-channel | ||
| configure.ac | ||
| COPYING | ||
| guix.scm | ||
| hall.scm | ||
| iroh.scm | ||
| Makefile.am | ||
| manifest.scm | ||
| pre-inst-env.in | ||
| README.md | ||
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.