Librsvg 2.40.20 is released

- gnome, librsvg, rust

Today I released librsvg 2.40.20. This will be the last release in the 2.40.x series, which is deprecated effectively immediately.

People and distros are strongly encouraged to switch to librsvg 2.41.x as soon as possible. This is the version that is implemented in a mixture of C and Rust. It is 100% API and ABI compatible with 2.40.x, so it is a drop-in replacement for it. If you or your distro can compile Firefox 57, you can probably build librsvg-2.41.x without problems.

Some statistics

Here are a few runs of loc — a tool to count lines of code — when run on librsvg. The output is trimmed by hand to only include C and Rust files.

This is 2.40.20:
-------------------------------------------------------
 Language      Files   Lines   Blank   Comment    Code
-------------------------------------------------------
 C                41   20972    3438      2100   15434
 C/C++ Header     27    2377     452       625    1300
This is 2.41.latest (the master branch):
-------------------------------------------------------
 Language      Files   Lines   Blank   Comment    Code
-------------------------------------------------------
 C                34   17253    3024      1892   12337
 C/C++ Header     23    2327     501       624    1202
 Rust             38   11254    1873       675    8706
And this is 2.41.latest *without unit tests*, 
just "real source code":
-------------------------------------------------------
 Language      Files   Lines   Blank   Comment    Code
-------------------------------------------------------
 C                34   17253    3024      1892   12337
 C/C++ Header     23    2327     501       624    1202
 Rust             38    9340    1513       610    7217

Summary

Not counting blank lines nor comments:

  • The C-only version has 16734 lines of C code.

  • The C-only version has no unit tests, just some integration tests.

  • The Rust-and-C version has 13539 lines of C code, 7217 lines of Rust code, and 1489 lines of unit tests in Rust.

As for the integration tests:

  • The C-only version has 64 integration tests.

  • The Rust-and-C version has 130 integration tests.

The Rust-and-C version supports a few more SVG features, and it is A LOT more robust and spec-compliant with the SVG features that were supported in the C-only version.

The C sources in librsvg are shrinking steadily. It would be incredibly awesome if someone could run some git filter-branch magic with the loc tool and generate some pretty graphs of source lines vs. commits over time.