resvg
$ resvg Community Low Riskresvg (resvg) is a high-fidelity, memory-safe Rust SVG rendering engine under Linebender. Its standalone CLI rasterizes static SVG files into crisp PNGs at arbitrary dimensions, zoom factors, or DPI with millisecond startup and zero Inkscape/Chromium overhead.
brew install resvg resvg rasterizes local SVG diagrams or icons to PNG in milliseconds directly from the shell.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Single-command non-interactive CLI (resvg in.svg out.png) with clean flags (--width, --zoom, --dpi) and deterministic exit codes.
- Zero interactive prompts and millisecond startup
- Supports stdin/stdout (
-/-c) workflows
Memory-safe Rust parser with no JavaScript/script execution inside SVGs and no network calls.
- Ignores SVG
<script>elements by design (static SVG subset) - Offline local execution
Tiny self-contained Rust binary installable via Homebrew, Cargo, and GitHub releases across all major OSes.
brew install resvgandcargo install resvg
Replaces heavyweight Inkscape or headless Chrome for fast SVG-to-PNG verification and asset builds.
- High SVG spec compliance including filters, masks, and gradients
Stewarded by Linebender (linebender/resvg) under dual Apache-2.0 OR MIT licensing.
- Active Linebender Rust 2D graphics organization
Concise README and resvg --help, though fewer standalone web guides than larger suites.
resvg --helpand GitHub README
Security, Auth & Guardrails
No credentials required; pure offline Rust executable.
Free open-source software (Apache-2.0 OR MIT).
# resvg Agent Rules - Specify `--width`, `--height`, or `--zoom` explicitly when converting small icon SVGs for social/README previews. - Pass `--resources-dir` (or keep `--skip-system-fonts` off only when fonts are needed) if rendering text-heavy SVGs consistently in CI. - Remember `resvg` targets static SVG-to-PNG rasterization (use `inkscape` for PDF/EPS output).
Agent-Ready Command Recipes
Safe Read-Only Queries
resvg --version
Prints the installed resvg binary version locally.
Controlled Writes & Previews
resvg --width 1600 diagram.svg dist/diagram.png
Converts diagram.svg to a crisp 1600px-wide PNG at dist/diagram.png.
Strengths for Agents
- + Tiny single Rust binary rasterizes SVGs to PNGs orders of magnitude faster than Inkscape or Chromium.
- + Ignores embedded SVG
<script>tags, avoiding XSS/execution risks. - + Permissive dual license (Apache-2.0 OR MIT) and wide availability (
brew,cargo).
Caveats & Pitfalls
- ! Outputs PNG only—does not convert SVG to PDF or EPS.
- ! Text-containing SVGs rely on system fonts unless
--use-font-file/--resources-diris provided.