diff --git a/website/public/flow.svg b/website/public/flow.svg index 5e8aec0..403e177 100644 --- a/website/public/flow.svg +++ b/website/public/flow.svg @@ -1,41 +1,45 @@ - + - - - binpatch Action (CI) - bsdiff old → new + + CI + - - old binary (100 MB) - + + user's machine + - - patch (70 KB) per hop - + + old binary (100 MB) - - - registry - GHCR / GH Releases + + + binpatch Action (CI) + bsdiff old → new - - + + patch (70 KB) - - - download in parallel + + + - - - resolveAndApply() - apply in order + + + over the wire - - - installed binary (100 MB) + + + resolveAndApply() + download (parallel) → apply (ordered) + + + + + + installed binary (100 MB) \ No newline at end of file diff --git a/website/src/content/docs/architecture.md b/website/src/content/docs/architecture.md index 94cccad..3ae972d 100644 --- a/website/src/content/docs/architecture.md +++ b/website/src/content/docs/architecture.md @@ -89,7 +89,7 @@ right trade. We considered bundling a native `mmap`-based reader for the old binary to avoid loading it fully into RAM. We chose not to because: -- Bun's native mmap is unavailable — we migrated off Bun. +- `mmap` via `bun:ffi` is not yet portable across the runtimes this library targets (Node and Bun). - `mmap-io` and similar native addons break esbuild + Node SEA bundling, which several shipped CLI consumers rely on. - For a 100 MB binary, an in-memory `Uint8Array` is fine: it's about diff --git a/website/src/content/docs/index.mdx b/website/src/content/docs/index.mdx index 19a5331..63ccea2 100644 --- a/website/src/content/docs/index.mdx +++ b/website/src/content/docs/index.mdx @@ -73,27 +73,7 @@ Action. ## How an update actually flows -``` - CI user's machine - ────── ─────────────── - old binary (100 MB) - │ - ▼ - ┌──────────────────────┐ - │ binpatch Action (CI) │ new binary (100 MB) - │ bsdiff old → new │ ──────────────────────► - └──────────────────────┘ - │ - ▼ - patch (70 KB) ────────────────────────► ┌──────────────────────────┐ - │ resolveAndApply() │ - │ download · verify · │ - │ reconstruct new binary │ - └──────────────────────────┘ - │ - ▼ - installed binary (100 MB) -``` +![How an update flows: CI produces patches from the old binary, publishes them to a registry, the user's binary downloads them in parallel and applies them in order to reconstruct the new binary.](/flow.svg) The user downloads kilobytes instead of megabytes. Your CI does the heavy lifting once.