Skip to content

[RFC] gdk-pixbuf-loader: initial attempt to port to rust

Alberto Ruiz requested to merge wip/aruiz/rust-pixbuf-loader into main

This is an RFC PR, there are some details that need to be ironed out but the heavy lifting is done.

Couple of things I would like to resolve that I detail below.

Any comments are welcome.

Size/Dynamic linking

The size difference vs. the C version is almost two orders of mangnitude higher. This is due to librsvg being statically linked inside the loader.

16K	/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/
9.7M	target/release/

It would be worth exploring if the C library and the pixbuf loader could share a private Rust shared library with the Rust API.


There is some unit testing already added, reviews welcome there.

I would like to also add an integration test to ensure that the .so module works using a custom loaders.cache

Memory usage

EDIT: I removed the leak report from valgrind as this was something caused by locale_config, not the pixbuf loader.

Edited by Alberto Ruiz

Merge request reports