Learn/pure Rust alternativeMediarusty_webp

Pure Rust Alternative for libwebp

rusty_webp is the Rust alternative to libwebp inside remade_ffmpeg_rs. It is a pure-Rust fork of image-rs, with no C library and no unsafe code on the path.

Signed by Tim Almond·
Painted pressed wildflowers under glass beside a second pane holding soft green light
What is the pure Rust alternative for libwebp?

rusty_webp is the pure Rust alternative for libwebp. It decodes VP8 and VP8L, including animation, and encodes lossless WebP. It is a fork of the image-rs Rust decoder and it links no C library.

Related reading

Builder field note

remade_ffmpeg_rs: FFmpeg-Class Media Pipeline in Pure Rust

APIs, composition, and MATA placement for remade_ffmpeg_rs: FFmpeg-Class Media Pipeline in Pure Rust live on the field note.

A pure Rust alternative for libwebp is what a product needs when WebP still enters through libwebp, the C library behind a lot of browsers' tooling and a lot of image servers. rusty_webp is the house crate. It decodes lossy VP8, lossless VP8L, and animated WebP, and it encodes lossless VP8L. The crate forbids unsafe code. It is not a foreign-function jacket over libwebp.

The honest lineage matters. A pure Rust alternative for libwebp is this crate, and the words pure Rust alternative for libwebp should stay attached to rusty_webp, the crate you meant to call. rusty_webp is a performance and feature fork of the Rust crate image-rs/image-webp. A pure Rust alternative for libwebp means the C library is off the hot path. It does not mean someone transliterated every libwebp function by hand. Version 0.1.3 in the remade_ffmpeg_rs tree is the crate this page describes. Callers who want the engine use that toolkit. Callers who want the codec alone can depend on rusty_webp.

The Rust alternative to libwebp

Still images are where upload bugs become memory bugs. JPEG has its own page. WebP deserves the same sentence, because the file the user did not make is allowed to name its own dimensions.

What libwebp still is

libwebp is the C reference. FFmpeg can decode WebP through its own native path or through that library, depending on the build. Either way the status quo is C on the pixels. A pure Rust alternative for libwebp keeps the container and the bitstream and runs them in rusty_webp. The parent page is the pure Rust alternative for FFmpeg. The field note is remade_ffmpeg_rs. The JPEG sibling, including the ArtCraft timing, is rusty_jpeg 0.4.4.

What the README already measured

This page does not invent a new benchmark. The crate README reports lossy decode faster than FFmpeg 8.1.2 on large frames, lossless decode faster still, animated files that FFmpeg's native decoder mishandles, and a lossless encoder faster than libwebp at its default effort. It also says the pixels match FFmpeg on that corpus. Those are the crate's measurements. A buyer should read them there, then confirm the version in the lockfile. The house encoder used for Learn heroes is this lineage: lossless WebP from the Remade image tool, not a call out to cwebp.

Allocation, then the interpreter next door

A pure Rust alternative for libwebp is a still-image decoder. The 21 October PHP bugs are a different runtime. They belong in one paragraph because the upload form and the decoder often share a process.

What PHP2Shell reaches

PHP2Shell is CVE-2026-109618 and CVE-2026-109619. A failed or fatal PHP request can leave memory for the next request on the same worker. rusty_webp does not patch PHP. If the form in front of the decoder is still PHP, the worker bug is still in the product. The house does not ship that worker. The search page is the pure Rust alternative for PHP. Services that place media on mata.network are on the Rust side of that line.

The image size that keeps coming

CVE-2026-109618 starts from an out-of-memory failure treated as a live request. A WebP header that names a huge canvas is the cousin on this page. AI pipelines do it again when a model asks for a decoded bitmap sized by a prompt or a frame. The bound belongs in the decoder, which returns an error for a file it will not allocate. The same shape on JPEG is the libjpeg alternative. NIST SSDF is the procurement language for preferring that memory-safe path.

Where a builder goes next

Use rusty_webp for a programmatic encode or decode. Use remade_ffmpeg_rs when the product already speaks a timeline of codecs. Keep libwebp out of the link line you ship.

Notes already on Learn

The toolkit story is remade_ffmpeg_rs and the FFmpeg alternative. Pictures that are JPEG stay on the libjpeg alternative. The band map is Media on Vision. The reason the org can say the interpreter is absent is the PHP alternative.

How to adopt the crate

Pin the version. Confirm the decode you call is rusty_webp and not a system libwebp that the build found on the path. Audit the graph with Deputy before you place it. A pure Rust alternative for libwebp is in production when a crafted WebP is an error from Rust, and the C library is no longer on the hot path.

People search pure Rust alternative for libwebp and then ask whether the crate is a wrapper. It is not. The pixels are decoded by Rust that forbids unsafe code, descended from image-rs and extended in the Remade tree. A pure Rust alternative for libwebp still owes the buyer the allocation sentence: a huge canvas is an error, in the same family as the PHP out-of-memory bug, on a path that does not run PHP. Quote the README's FFmpeg comparison from the crate, not from memory, and keep this page as the search URL beside the FFmpeg alternative. +++

FAQ

Quick answers for builders evaluating this technology.

Is rusty_webp a line-by-line rewrite of libwebp?

It is a performance and feature fork of image-rs/image-webp, written in Rust, with unsafe code forbidden. The C library it replaces on the hot path is libwebp. The lineage is the Rust crate, not a wrapper.

Where does rusty_webp live?

Inside remade_ffmpeg_rs, at crates/rusty_webp, version 0.1.3 in that tree. The crate is also published as rusty_webp. Most callers want the toolkit facade.

What does the crate claim against FFmpeg?

The rusty_webp README reports lossy and lossless decode faster than FFmpeg 8.1.2 on its corpus, with bit-exact pixels, and a lossless encoder faster than libwebp's default effort. This page does not add a new timing run.

How does WebP meet PHP2Shell?

An upload form that still runs PHP inherits the interpreter bug. rusty_webp does not patch PHP. The allocation cousin is a hostile image size, which is the same shape as the PHP out-of-memory flaw.

Where should a builder read the pure Rust alternative for libwebp?

Read the FFmpeg alternative for the toolkit, the libjpeg alternative for the other still-image path, and the PHP alternative for the interpreter the house does not ship.