Run delta in the browser
A pager for git and diff output with syntax highlighting, word-level changes and side-by-side view.
Try it live
Nothing is downloaded until you press Run.
Check the installed delta build
Installs delta 0.19.2 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.
delta --version delta --help | head -n 3
$ delta --version delta 0.19.2 $ delta --help | head -n 3 A viewer for git and diff output Usage: delta [OPTIONS] [MINUS_FILE] [PLUS_FILE]
What it is
delta (git-delta) reformats unified diffs: it highlights the code with the language's syntax, marks the exact words that changed within a line, and can show side-by-side views with line numbers. It is usually configured as git's pager.
Package facts
- version
0.19.2- runs on
- RISC-V VM (
elf-app,riscv64gc-linux-musl) - download
- 3.3 MB compressed · 1 file
- command
delta- requires
- nothing else — a static binary
- license
MIT(upstream)- upstream
- github.com/dandavison/delta
- categories
- Text
- collections
- Git workflow
- catalog
- generation 12, Ed25519-signed
Install and run it from your page
With the SDK, installApp resolves delta in the signed index, fetches its content-addressed chunks from the CDN, verifies each one and writes the files into the VM. Details in Installing catalog apps.
import { createNano } from "@userland-run/nano-sdk";
const nano = await createNano({ image: { wasm: "/nano/console.wasm" }, ramMB: 512 });
await nano.installApp("delta"); // signature-verified, cached in OPFS
const r = await nano.shExec("delta --version");
console.log(r.stdout);Typical usage of the upstream command-line tool:
git diff | delta --side-by-side
Caveats
- On NanoVM v0.2.1 its real work did not finish within the live sample's 2-billion-instruction budget in our tests (it parallelises with threads, which NanoVM schedules cooperatively), so the live sample only checks the installed build.
Related apps
- gix0.55.0The gitoxide command line: a pure-Rust implementation of git for inspecting and working with repositories.RISC-V VMnet9.4 MB
- ripgrep14.1.0Search file contents recursively with a regex, fast, respecting .gitignore.RISC-V VM9.2 MB
- sd1.0.0Find and replace text with familiar regex syntax — a simpler sed for substitutions.RISC-V VM956 kB