Run resvg in the browser
Render SVG files to PNG with a fast, standards-focused renderer.
Try it live
Nothing is downloaded until you press Run.
Rasterise an SVG
Installs resvg 0.47.0 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.
resvg --version resvg --width 256 logo.svg logo.png wc -c logo.png
$ resvg --version 0.47.0 $ resvg --width 256 logo.svg logo.png $ wc -c logo.png 4495 logo.png
What it is
resvg is an SVG rendering library and CLI aimed at correctness against the SVG specification and consistent output across platforms. In the browser it rasterises SVGs inside the VM — for example to produce PNG thumbnails or social images — without a canvas or server.
Package facts
- version
0.47.0- runs on
- RISC-V VM (
elf-app,riscv64gc-linux-musl) - download
- 1.7 MB compressed · 1 file
- command
resvg- requires
- nothing else — a static binary
- license
Apache-2.0 OR MIT(upstream)- upstream
- github.com/linebender/resvg
- categories
- Images
- catalog
- generation 12, Ed25519-signed
Install and run it from your page
With the SDK, installApp resolves resvg 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("resvg"); // signature-verified, cached in OPFS
const r = await nano.shExec("resvg --version");
console.log(r.stdout);Typical usage of the upstream command-line tool:
resvg --width 1200 logo.svg logo.png
Related apps
- oxipng10.1.1Shrink PNG files losslessly by re-encoding them with better compression settings.RISC-V VM666 kB
- hexyl0.14.0View binary files as a hex dump with offsets, byte categories and an ASCII column.RISC-V VM419 kB
- pastel0.12.0Generate, convert, analyze and manipulate colors from the command line.RISC-V VM582 kB