resvg renders static SVG files and markup to raster images as a Rust library, C library, or command-line tool.
Overview
resvg is an SVG rendering library focused on the static subset of SVG rather than animations, scripting, or interactive browser features. It targets correct, deterministic output across platforms without relying on system graphics stacks for rendering itself.
Parsing and tree building are separated from rasterization through the usvg companion library, so other renderers can reuse the same SVG preprocessing. Drawing uses the tiny-skia 2D engine, and the project maintains a large regression test suite against SVG-to-PNG fixtures.
You can embed resvg in Rust or C programs or invoke it as a standalone CLI to convert SVG inputs to PNG. The CLI binary stays small and does not require external runtime dependencies beyond what ships with the build.
Supported markup excludes dynamic elements such as animation, cursor handling, and script execution. SVG 2 support is in progress; SVG Tiny 1.2 is out of scope. Text is rendered without native system fonts because the design avoids platform font APIs, using bundled font handling instead.
Key features
- Static SVG to raster output
- Rust and C library APIs
- Standalone CLI renderer
- Separated parsing via usvg
- tiny-skia-based drawing
- Large conformance test suite
- Cross-platform reproducible pixels
- No system library rendering deps
Use cases
- Server-side SVG to PNG conversion
- Embedding SVG rasterization in Rust apps
- Batch rendering icon and diagram assets
- Building custom renderers on usvg