From 4257d13e88ea0e343afd7f71c57d5da3146d0d58 Mon Sep 17 00:00:00 2001 From: Serge Koenigsmann Date: Mon, 22 Jun 2026 02:02:16 +0000 Subject: [PATCH] docs: Build-Anleitung in README erweitern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Voraussetzungen (Rust-Toolchain), Release-Build, Binary-Pfad, ausführen, cargo install und optionaler statischer musl-Build (inkl. musl-tools-Hinweis). Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b3ad96d..05775a2 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,45 @@ ohne Tricks. ## Build +Voraussetzung: eine Rust-Toolchain (Rust 1.82+). Falls noch nicht vorhanden: + +```bash +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +Release-Binary bauen: + ```bash cargo build --release -# Binary: ./target/release/iroh-forward +``` + +Das fertige Binary liegt unter `./target/release/iroh-forward`. Direkt ausführen: + +```bash +./target/release/iroh-forward --help +# oder ohne expliziten Build: +cargo run --release -- --help +``` + +Systemweit installieren (nach `~/.cargo/bin`): + +```bash +cargo install --path . +``` + +### Statisches Binary fürs Deployment (optional) + +Für ein weitgehend abhängigkeitsfreies Binary, das auf jedem Linux-Host ohne passende glibc läuft, +gegen musl bauen. Da iroh standardmäßig `ring` (C-Crypto) nutzt, wird die musl-C-Toolchain +benötigt: + +```bash +# Debian/Ubuntu: +sudo apt install musl-tools +rustup target add x86_64-unknown-linux-musl + +cargo build --release --target x86_64-unknown-linux-musl +# Binary: ./target/x86_64-unknown-linux-musl/release/iroh-forward ``` ## Nutzung