Federico's Blog

https://viruta.org/ (RSS)
visit blog
Fixing a memory leak of xmlEntityPtr in librsvg
13 Jun 2024 | original ↗

Since a few weeks ago, librsvg is now in oss-fuzz — Google's constantly-running fuzz-testing for OSS projects — and the crashes have started coming in. I'll have a lot more to say soon about crashes in Cairo, which is where the majority of the bugs are so far, but for now I …

Rustifying libipuz: character sets
18 Feb 2024 | original ↗

It has been, what, like four years since librsvg got fully rustified, and now it is time to move another piece of critical infrastructure to a memory-safe language. I'm talking about libipuz, the GObject-based C library that GNOME Crosswords uses underneath. This is a library that parses the ipuz file …

Librsvg will use Rust-only image decoders starting on 2.58.0
22 Dec 2023 | original ↗

Starting with version 2.58.0, librsvg will no longer use gdk-pixbuf to decode raster images that are referenced from SVG documents. For example, an element like this: href="foo.jpg" width="100" height="100"/> I have just pushed a merge request to make librsvg use the image-rs …

Vilanova / Barcelona 2006: Memories of GUADECs past
20 Nov 2023 | original ↗

Skip to main content Federico Vilanova / Barcelona 2006: Memories of GUADECs past Open navigation Federico's Blog ...

Stuttgart 2005: Memories of GUADECs past
31 Oct 2023 | original ↗

Skip to main content Federico Stuttgart 2005: Memories of GUADECs past Open navigation Federico's Blog ...

Librsvg is available from crates.io now
14 Aug 2023 | original ↗

Since last Friday, librsvg is available from crates.io. You can add this line to your dependencies in Cargo.toml: librsvg = "2.57.0-beta.2" I am nailing down the release process for this, but my intention is that starting with GNOME 45 / librsvg-2.57.0, the Rust crate will …

Reducing code size in librsvg by removing an unnecessary generic struct
25 Feb 2023 | original ↗

Someone mentioned cargo-bloat the other day and it reminded me that I have been wanting to measure the code size for generic functions in librsvg, and see if there are improvements to be made. Cargo-bloat can give you a rough estimate of the code size for each Rust crate in …

Los cajones - Dos mesitas de noche, parte 3
13 Feb 2023 | original ↗

Disculpen la pausa tan larga en escribir este blog. Comencé a poner mis hilos de carpintería en Mastodon y dejé olvidado este lugar. Pero bien, prosigamos. Dos mesitas de noche: Parte 1: Preparar las piezas Parte 2: Marcar las patas Parte 3: Los cajones En la parte 2 hicimos las …

Some thoughts on linking to code
12 Jan 2023 | original ↗

I have been updating the text layout roadmap for librsvg, and part of this involves describing how some of the current code works — for example, how a element gets broken up into a tree of Chunk and Span structures. Notice how those links go to the generated documentation for …

Development guides for librsvg and at-spi2-core
20 Dec 2022 | original ↗

When I started helping out with Crosswords, JRB taught me a valuable lesson: before implementing a non-trivial feature, or doing a non-trivial change, one should first write a document with the design of the feature. It doesn't have to be anything formal; just an explanation of where you are coming …

Paying technical debt in our accessibility infrastructure - Transcript from my GUADEC talk
3 Aug 2022 | original ↗

At GUADEC 2022 in Guadalajara I gave a talk, Paying technical debt in our accessibility infrastructure. This is a transcript for that talk. The video for the talk starts at 2:25:06 and ends at 3:07:18; you can click on the image above and it will take …

Librsvg's development branch is now called main
6 Jul 2022 | original ↗

I have just renamed librsvg's master branch to main, as other modules already have. This is what I did: Rename the local branch, and push it: git branch -m master main git push origin main Change the default branch in gitlab; for librsvg this is in the repository settings / Default …

Fixing test coverage reports in at-spi2-core
28 Jun 2022 | original ↗

Over the past weeks I have been fixing the test coverage report for at-spi2-core. It has been a bit of an adventure where I had to do these: Replace a code coverage tool for another one... ... which was easier to modify to produce more accessible HTML reports. Figuring out why …

Accessibility repositories are now merged
1 Jun 2022 | original ↗

Over the past week I worked on merging the atk and at-spi2-atk repositories into at-spi2-core. A quick reminder of what they do: at-spi2-core: Has the XML definitions of the DBus interfaces for accessibility — what lets a random widget identify itself as having a Button role, or what lets a random …

Paying technical debt in our accessibility infrastructure
30 Apr 2022 | original ↗

This is somewhat of an extended abstract for the talk I want to give at GUADEC. Curently, very few people work on GNOME's accessibility infrastructure, which is basically what the free desktop ecosystem uses regardless of GUI toolkit. After Oracle acquired Sun Microsystems in 2010, paid work on accessibility virtually …

Automating my home network with Salt
5 Apr 2022 | original ↗

I'm a lousy sysadmin. For years, my strategy for managing my machines in my home network has been one of maximum neglect: Avoid distribution upgrades or reinstalls as much as possible, because stuff breaks or loses its configuration. Keep my $HOME intact across upgrades, to preserve my personal configuration files …

Moving librsvg's documentation to gi-docgen
13 Jan 2022 | original ↗

Librsvg's documentation tooling is pretty ancient. The man page for rsvg-convert is written by hand in troff, and the C library's reference documentation still uses the venerable gtk-doc. As part of the modernization effort, I have turned the man page into a reStructuredText document, and the C API documentation into …

Text in librsvg starts to get better
21 Oct 2021 | original ↗

Up to now, text support in librsvg has been fairly limited. The text chapter in the SVG spec is pretty big and it contains features that are very much outside of my experience (right-to-left languages, vertical text). But now I think I have a plan for how to improve the …

GNOME themes, an incomplete status report, and how you can help
1 Sept 2021 | original ↗

"Themes in GNOME" is a complicated topic in technical and social terms. Technically there are a lot of incomplete moving parts; socially there is a lot of missing documentation to be written, a lot of miscommunication and mismatched expectations. The following is a brief and incomplete, but hopefully encouraging, summary …

Bzip2's experimental repository is changing maintainership
4 Jun 2021 | original ↗

Bzip2's stable repository is maintained at Sourceware by Mark Wielaard. In 2019 I started maintaining an experimental repository in GitLab, with the intention of updating the build system and starting a Rust port of bzip2. Unfortunately I have left this project slip by. The new maintainer of the experimental repository …

Librsvg, Rust, and non-mainstream architectures
25 Feb 2021 | original ↗

Almost five years ago librsvg introduced Rust into its source code. Around the same time, Linux distributions started shipping the first versions of Firefox that also required Rust. I unashamedly wanted to ride that wave: distros would have to integrate a new language in their build infrastructure, or they would …

Do not use librsvg 2.40.x
27 Nov 2020 | original ↗

Please do not use librsvg 2.40.x; it cannot render recent Adwaita icon themes correctly. The librsvg 2.40.x series is the last "C only" version of the library; it was deprecated in 2017. During the port to Rust, I rewrote the path parser to be spec-compliant, and …

Librsvg's test suite is now in Rust
26 Oct 2020 | original ↗

Some important changes are afoot in librsvg. Changes to continuous integration Some days ago, Dunja Lalic rewrote the continuous integration scripts to be much faster. A complete pipeline used to take about 90 minutes to run, now it takes about 15 minutes on average. The description of changes is interesting …

Librsvg is accepting interns for Outreachy's December 2020 round
5 Oct 2020 | original ↗

There are two projects in librsvg available for Outreachy applicants in the December 2020 / March 2021 round: Revamp the text engine - Do you know about international text layout? Can you read a right-to-left language, or do you write in a language that requires complex shaping? Would you like to implement …

"Rust does not have a stable ABI"
13 Aug 2020 | original ↗

I've seen GNOME people (often, people who have been working for a long time on C libraries) express concerns along the following lines: Compiled Rust code doesn't have a stable ABI (application binary interface). So, we can't have shared libraries in the traditional fashion of Linux distributions. Also Rust bundles …

Looking for candidates for the 2020 GNOME Foundation elections
26 May 2020 | original ↗

I forgot to write this a few days ago; I hope it is not too late. The GNOME Foundation's elections for the Board are coming up, and we are looking for candidates. Of the 7 directors, we are replacing 4, and the 3 remaining positions remain for another year. You …

Bringing my Emacs from the past
28 Apr 2020 | original ↗

I started using Emacs in 1995, and since then I have been carrying a .emacs that by now has a lot of accumulated crap. It is such an old configuration that it didn't even use the modern convention of ~/.emacs.d/init.el (and it looks like a newer Emacs …

Reducing memory consumption in librsvg, part 4: compact representation for Bézier paths
27 Mar 2020 | original ↗

Let's continue with the enormous SVG from the last time, a map extracted from OpenStreetMap. According to Massif, peak memory consumption for that file occurs at the following point during the execution of rsvg-convert. I pasted only the part that refers to Bézier paths: ...

Reducing memory consumption in librsvg, part 3: slack space in Bézier paths
24 Mar 2020 | original ↗

We got a bug with a gigantic SVG of a map extracted from OpenStreetMap, and it has about 600,000 elements. Most of them are , that is, specifications for Bézier paths. A can look like this: d="m 2239.05,1890.28 5.3,-1.81"/> The …

Reducing memory consumption in librsvg, part 2: SpecifiedValues
20 Mar 2020 | original ↗

To continue with last time's topic, let's see how to make librsvg's DOM nodes smaller in memory. Since that time, there have been some changes to the code; that is why in this post some of the type names are different from last time's. Every SVG element is represented with …

Librsvg accepting interns for Summer of Code 2020
16 Mar 2020 | original ↗

Are you a student qualified to run for Summer of Code 2020? I'm willing to mentor the following project for librsvg. Project: Revamp the text engine in librsvg Librsvg supports only a few features of the SVG Text specification. It requires extra features to be really useful: Proper bidirectional support …

Reducing memory consumption in librsvg, part 1: text nodes
13 Mar 2020 | original ↗

Librsvg's memory consumption has not been a problem so far for GNOME's use cases, which is basically rendering icons. But for SVG files with thousands of elements, it could do a lot better. Memory consumption in the DOM Librsvg shares some common problems with web browsers: it must construct a …

Exposing C and Rust APIs: some thoughts from librsvg
15 Jan 2020 | original ↗

Librsvg exports two public APIs: the C API that is in turn available to other languages through GObject Introspection, and the Rust API. You could call this a use of the facade pattern on top of the rsvg_internals crate. That crate is the actual implementation of librsvg, and exports an …

Moving gnome-shell's styles to Rust
26 Nov 2019 | original ↗

Gnome-shell uses CSS processing code that dates from HippoCanvas, a CSS-aware canvas from around 2006. It uses libcroco to parse CSS, and implements selector matching by hand in C. This code is getting rather dated, and libcroco is unmaintained. I've been reading the code for StTheme and StThemeNode, and it …

Refactoring the Length type
19 Nov 2019 | original ↗

CSS length values have a number and a unit, e.g. 5cm or 6px. Sometimes the unit is a percentage, like 50%, and SVG says that lengths with percentage units should be resolved with respect to a certain rectangle. For example, consider this circle element: cx="50%" cy="75 …

CSS in librsvg is now in Rust, courtesy of Mozilla Servo
12 Nov 2019 | original ↗

Summary: after an epic amount of refactoring, librsvg now does all CSS parsing and matching in Rust, without using libcroco. In addition, the CSS engine comes from Mozilla Servo, so it should be able to handle much more complex CSS than librsvg ever could before. This is the story of …

Gdk-pixbuf modules - call for help
12 Sept 2019 | original ↗

I've been doing a little refactoring of gdk-pixbuf's crufty code, to see if the gripes from my braindump can be solved. For things where it is not obvious how to proceed, I've started taking more detailed notes in a gdk-pixbuf survey. Today I was looking at which gdk-pixbuf modules are …

On responsible vulnerability disclosure
11 Aug 2019 | original ↗

Recently KDE had an unfortunate event. Someone found a vulnerability in the code that processes .desktop and .directory files, through which an attacker could create a malicious file that causes shell command execution (analysis). They went for immediate, full disclosure, where KDE didn't even get a chance of fixing the …

Constructors
24 Jul 2019 | original ↗

Have you ever had these annoyances with GObject-style constructors? From a constructor, calling a method on a partially-constructed object is dangerous. A constructor needs to set up "not quite initialized" values in the instance struct until a construct-time property is set. You actually need to override GObjectClass::constructed (or was …

Gtk-rs tutorial
8 Jul 2019 | original ↗

Leonora Tindall has written a very nice tutorial on Speedy Desktop Apps With GTK and Rust. It covers prototyping a dice roller app with Glade, writing the code with Rust and the gtk-rs bindings, and integrating the app into the desktop with a .desktop file.

Removing rsvg-view
2 Jul 2019 | original ↗

I am preparing the 2.46.0 librsvg release. This will no longer have the rsvg-view-3 program. History of rsvg-view Rsvg-view started out as a 71-line C program to aid development of librsvg. It would just render an SVG file to a pixbuf, stick that pixbuf in a GtkImage widget …

Bzip2 1.0.7 is released
27 Jun 2019 | original ↗

Bzip2 1.0.7 has been released by Mark Wielaard. We have a slight change of plans since my last post: The 1.0.x series is in strict maintenance mode and will not change build systems. This is targeted towards embedded use, as in projects which already embed the …

Preparing the bzip2-1.0.7 release
20 Jun 2019 | original ↗

ATTENTION ALL DISTRIBUTIONS: this is for you. THE SONAME MAY CHANGE! I am preparing a bzip2-1.0.7 release. You can see the release notes, which should be of interest: Many historical patches from various distributions are integrated now. We have a new fix for the just-published CVE-2019-12900, courtesy of …

Bzip2 in Rust: porting the randomization table
11 Jun 2019 | original ↗

Here is a straightforward port of some easy code. randtable.c has a lookup table with seemingly-random numbers. This table is used by the following macros in bzlib_private.h: extern Int32 BZ2_rNums[512]; #define BZ_RAND_DECLS \ Int32 rNToGo; \ Int32...

Bzip2 uses Meson and Autotools now — and a plea for help
7 Jun 2019 | original ↗

There is a lot of activity in the bzip2 repository! Perhaps the most exciting thing is that Dylan Baker made a merge request to add Meson as a build system for bzip2; this is merged now into the master branch. The current status is this: Both Meson and Autotools are …

Bzip2 repository reconstructed
6 Jun 2019 | original ↗

I have just done a git push --force-with-lease to bzip2's master branch, which means that if you had a previous clone of this repository, you'll have to re-fetch it and rebase any changes you may have on top. I apologize for the inconvenience! But I have a good excuse: Julian …

Maintaining bzip2
5 Jun 2019 | original ↗

Today I had a very pleasant conversation with Julian Seward, of bzip2 and Valgrind fame. Julian has kindly agreed to cede the maintainership of bzip2 to me. Bzip2 has not had a release since 2010. In the meantime, Linux distros have accumulated a number of bug/security fixes for it …

Bzip2 in Rust - Basic infrastructure and CRC32 computation
30 May 2019 | original ↗

I have started a little experiment in porting bits of the widely-used bzip2/bzlib to Rust. I hope this can serve to refresh bzip2, which had its last release in 2010 and has been nominally unmaintained for years. I hope to make several posts detailing how this port is done …

Containing mutability in GObjects
16 Apr 2019 | original ↗

Traditionally, GObject implementations in C are mutable: you instantiate a GObject and then change its state via method calls. Sometimes this is expected and desired; a GtkCheckButton widget certainly can change its internal state from pressed to not pressed, for example. Other times, objects are mutable while they are being …

A Rust API for librsvg
15 Mar 2019 | original ↗

After the librsvg team finished the rustification of librsvg's main library, I wanted to start porting the high-level test suite to Rust. This is mainly to be able to run tests in parallel, which cargo test does automatically in order to reduce test times. However, this meant that librsvg needed …

Rust build scripts vs. Meson
27 Feb 2019 | original ↗

One of the pain points in trying to make the Meson build system work with Rust and Cargo is Cargo's use of build scripts, i.e. the build.rs that many Rust programs use for doing things before the main build. This post is about my exploration of what build …

Who wrote librsvg?
15 Feb 2019 | original ↗

Authors by lines of code, each year: Authors by percentage of lines of code, each year: Which lines of code remain each year? The shitty thing about a gradual rewrite is that a few people end up "owning" all the lines of source code. Hopefully this post is a little …

Librsvg's GObject boilerplate is in Rust now
24 Jan 2019 | original ↗

The other day I wrote about how most of librsvg's library code is in Rust now. Today I finished porting the GObject boilerplate for the main RsvgHandle object into Rust. This means that the C code no longer calls things like g_type_register_static(), nor implements rsvg_handle_class_init() and such; all those are …

Librsvg is almost rustified now
10 Jan 2019 | original ↗

Since a few days ago, librsvg's library implementation is almost 100% Rust code. Paolo Borelli's and Carlos Martín Nieto's latest commits made it possible. What does "almost 100% Rust code" mean here? The C code no longer has struct fields that refer to the library's real work. The only field …

Marcar las patas - Dos mesitas de noche, parte 2
5 Jan 2019 | original ↗

Dos mesitas de noche: Parte 1: Preparar las piezas Parte 2: Marcar las patas Parte 3: Los cajones En la parte 1 preparé la madera para todas las piezas principales de las mesitas de noche / burós. Esto es lo que voy a construir: Siempre me da nervios que las patas …

Dos mesitas de noche, parte 1 - preparar las piezas
3 Jan 2019 | original ↗

Dos mesitas de noche: Parte 1: Preparar las piezas Parte 2: Marcar las patas Parte 3: Los cajones Hace unos años hice una mesita de noche para mi esposa. Siempre tuve la intención de hacer una para mí y otra para mi hija... y bueno, ocho años después empiezo a …

Reinicio de La Viruta Rebelde
3 Jan 2019 | original ↗

Al igual que hice con mi blog principal hace un par de años, acabo de mover La Viruta Rebelde al motor de Pelican. Todos los articulos viejos se encuentran aquí.

In support of Coraline Ada Ehmke
7 Dec 2018 | original ↗

Last night, the linux.org DNS was hijacked and redirected to a page that doxed her. Coraline is doing extremely valuable work with the Contributor Covenant code of conduct, which many free software projects have adopted already. Coraline has been working for years in making free software, and computer technology …

My GUADEC 2018 presentation
6 Dec 2018 | original ↗

I just realized that I forgot to publish my presentation from this year's GUADEC. Sorry, here it is! You can also get the ODP file for the presentation. This is released under a CC-BY-SA license. This is the video of the presentation. Update Dec/06: Keen readers spotted an incorrect …

Refactoring allowed URLs in librsvg
29 Nov 2018 | original ↗

While in the middle of converting librsvg's code that processes XML from C to Rust, I went into a digression that has to do with the way librsvg decides which files are allowed to be referenced from within an SVG. Resource references in SVG SVG files can reference other files …

Thessaloniki GNOME+Rust Hackfest 2018
27 Nov 2018 | original ↗

A couple of weeks ago we had the fourth GNOME+Rust hackfest, this time in Thessaloniki, Greece. This is the beautiful city that will host next year's GUADEC, but fortunately GUADEC will be in summertime! We held the hackfest at the CoHo coworking space, a small, cozy office between the …

Propagating Errors
21 Nov 2018 | original ↗

Lately, I have been converting the code in librsvg that handles XML from C to Rust. For many technical reasons, the library still uses libxml2, GNOME's historic XML parsing library, but some of the callbacks to handle XML events like start_element, end_element, characters, are now implemented in Rust. This has …

My gdk-pixbuf braindump
6 Sept 2018 | original ↗

I want to write a braindump on the stuff that I remember from gdk-pixbuf's history. There is some talk about replacing it with something newer; hopefully this history will show some things that worked, some that didn't, and why. The beginnings Gdk-pixbuf started as a replacement for Imlib, the image …

Debugging an Rc reference leak in Rust
29 Aug 2018 | original ↗

The bug that caused two brown-paper-bag released in librsvg — because it was leaking all the SVG nodes — has been interesting. Memory leaks in Rust? Isn't it supposed to prevent that? Well, yeah, but the leaks were caused by the C side of things, and by unsafe code in Rust, which …

Logging from Rust in librsvg
4 Aug 2018 | original ↗

Over in this issue we are discussing how to add debug logging for librsvg. A popular way to add logging to Rust code is to use the log crate. This lets you sprinkle simple messages in your code: error!("something bad happened: {}", foo); debug!("a debug message"); However, the log …

Three big things happening in librsvg
22 May 2018 | original ↗

I am incredibly happy because of three big things that are going on in librsvg right now: Paolo Borelli finished porting all the CSS properties to Rust. What was once a gigantic RsvgState struct in C is totally gone, along with all the janky C code to parse individual properties …

Reducing the number of image copies in GNOME
14 May 2018 | original ↗

Our graphics stack that deals with images has evolved a lot over the years. In ye olden days In the context of GIMP/GNOME, the only thing that knew how to draw RGB images to X11 windows (doing palette mapping for 256-color graphics cards and dithering if necessary) was the …

Madrid GNOME+Rust Hackfest, part 3 (conclusion)
23 Apr 2018 | original ↗

The last code I wrote during the hackfest was the start of code generation for GObject interfaces. This is so that you can do gobject_gen! { interface Foo { virtual fn frob(&self); } } and it will generate the appropriate FooIface like one would expect with the C versions of interfaces. It turns …

Madrid GNOME+Rust Hackfest, part 2
20 Apr 2018 | original ↗

Hacking on gnome-class continues apace! Philippe updated our dependencies. Alberto made the syntax for per-instance private structs more ergonomic, and then made that code nice and compact. Martin improved our conversion from CamelCase to snake_case for code generation. Daniel added initial support for GObject properties. This is not finished yet …

Madrid GNOME+Rust Hackfest, part 1
18 Apr 2018 | original ↗

I'm in Madrid since Monday, at the third GNOME+Rust hackfest! The OpenShine folks are kindly letting us use their offices, on the seventh floor of a building by the Cuatro Caminos roundabout. I am very, very thankful that this time everyone seems to be working on developing gnome-class. It's …

Refactoring some repetitive code to a Rust macro
23 Mar 2018 | original ↗

I have started porting the code in librsvg that parses SVG's CSS properties from C to Rust. Many properties have symbolic values: stroke-linejoin: miter | round | bevel | inherit stroke-linecap: butt | round | square | inherit fill-rule: nonzero | evenodd | inherit StrokeLinejoin is the first property that I ported. First I had to write a …

Making sure the repository doesn't break, automatically
21 Mar 2018 | original ↗

Gitlab has a fairly conventional Continuous Integration system: you push some commits, the CI pipelines build the code and presumably run the test suite, and later you can know if this succeeded of failed. But by the time something fails, the broken code is already in the public repository. The …

Librsvg and Gnome-class accepting interns
13 Mar 2018 | original ↗

I would like to mentor people for librsvg and gnome-class this Summer, both for Outreachy and Summer of Code. Librsvg projects Project: port filter effects from C to Rust Currently librsvg implements SVG filter effects in C. These are basic image processing filters like Gaussian blur, matrix convolution, Porter-Duff alpha …

Helping Cairo
7 Mar 2018 | original ↗

Cairo needs help. It is the main 2D rendering library we use in GNOME, and in particular, it's what librsvg uses to render all SVGs. My immediate problem with Cairo is that it explodes when called with floating-point coordinates that fall outside the range that its internal fixed-point numbers can …

Quick and dirty checklist to update syn 0.11.x to syn 0.12
27 Feb 2018 | original ↗

Today I ported gnome-class from version 0.11 of the syn crate to version 0.12. syn is a somewhat esoteric crate that you use to parse Rust code... from a stream of tokens... from within the implementation of a procedural macro. Gnome-class implements a mini-language inside your own Rust …

Rust things I miss in C
24 Feb 2018 | original ↗

Librsvg feels like it is reaching a tipping point, where suddenly it seems like it would be easier to just port some major parts from C to Rust than to just add accessors for them. Also, more and more of the meat of the library is in Rust now. I'm …

Librsvg's continuous integration pipeline
23 Feb 2018 | original ↗

Jordan Petridis has been kicking ass by overhauling librsvg's continous integration (CI) pipeline. Take a look at this beauty: On every push, we run the Test stage. This is a quick compilation on a Fedora container that runs "make check" and ensures that the test suite passes. We have a …

RFC: Integrating rsvg-rs into librsvg
22 Feb 2018 | original ↗

I have started an RFC to integrate rsvg-rs into librsvg. rsvg-rs is the Rust binding to librsvg. Like the gtk-rs bindings, it gets generated from a pre-built GIR file. It would be nice for librsvg to provide the Rust binding by itself, so that librsvg's own internal tools can be …

Writing a command-line program in Rust
3 Feb 2018 | original ↗

As a library writer, it feels a bit strange, but refreshing, to write a program that actually has a main() function. My experience with Rust so far has been threefold: Porting chunks of C to Rust for librsvg - this is all work on librsvg's internals and no users are exposed …

rsvg-bench - a benchmark for librsvg
2 Feb 2018 | original ↗

Librsvg 2.42.0 came out with a rather major performance regression compared to 2.40.20: SVGs with many transform attributes would slow it down. It was fixed in 2.42.1. We changed from using a parser that would recompile regexes each time it was called, to one …

Help needed for librsvg 2.42.1
16 Jan 2018 | original ↗

Would you like to help fix a couple of bugs in librsvg, in preparation for the 2.42.1 release? I have prepared a list of bugs which I'd like to be fixed in the 2.42.1 milestone. Two of them are assigned to myself, as I'm already working …

Librsvg gets Continuous Integration
12 Jan 2018 | original ↗

One nice thing about gitlab.gnome.org is that we can now have Continuous Integration (CI) enabled for projects there. After every commit, the CI machinery can build the project, run the tests, and tell you if something goes wrong. Carlos Soriano posted a "tips of the week" mail to …

Loving Gitlab.gnome.org, and getting notifications
8 Jan 2018 | original ↗

I'm loving gitlab.gnome.org. It has been only a couple of weeks since librsvg moved to gitlab, and I've already received and merged two merge requests. (Isn't it a bit weird that Github uses "pull request" and Everyone(tm) knows the PR acronym, but Gitlab uses "merge request"?) Notifications …

Librsvg 2.40.20 is released
16 Dec 2017 | original ↗

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 …

Librsvg moves to Gitlab
13 Dec 2017 | original ↗

Librsvg now lives in GNOME's Gitlab instance. You can access it here. Gitlab allows workflows similar to Github: you can create an account there, fork the librsvg repository, file bug reports, create merge requests... Hopefully this will make it nicer for contributors. In the meantime, feel free to take a …

A mini-rant on the lack of string slices in C
7 Dec 2017 | original ↗

Porting of librsvg to Rust goes on. Yesterday I started porting the C code that implements SVG's family of elements. I have also been replacing the little parsers in librsvg with Rust code. And these days, the lack of string slices in C is bothering me a lot. What …

Code Hospitality
17 Nov 2017 | original ↗

Recently on the Greater than Code podcast there was an episode called "Code Hospitality", by Nadia Odunayo. Nadia talks about thinking of how to make people comfortable in your code and in your team/organization/etc., and does it in terms of thinking about host/guest relationships. Have you ever …

Rust+GNOME Hackfest in Berlin, 2017
17 Nov 2017 | original ↗

Last weekend I was in Berlin for the second Rust+GNOME Hackfest, kindly hosted at the Kinvolk office. This is in a great location, half a block away from the Kottbusser Tor station, right at the entrance of the trendy Kreuzberg neighborhood — full of interesting people, incredible graffitti, and good …

Librsvg's build infrastructure: Autotools and Rust
11 Nov 2017 | original ↗

Today I released librsvg 2.41.1, and it's a big release! Apart from all the Rust goodness, and the large number of bug fixes, I am very happy with the way the build system works these days. I've found it invaluable to have good examples of Autotools incantations to …

Compilation notifications in Emacs
7 Nov 2017 | original ↗

Here is a little Emacs Lisp snippet that I've started using. It makes Emacs pop up a desktop-wide notification when a compilation finishes, i.e. after "M-x compile" is done. Let's see if that keeps me from wasting time in the web when I launch a compilation. (setq compilation-finish-functions (append …

How glib-rs works, part 3: Boxed types
9 Sept 2017 | original ↗

(First part of the series, with index to all the articles) Now let's get on and see how glib-rs handles boxed types. Boxed types? Let's say you are given a sealed cardboard box with something, but you can't know what's inside. You can just pass it on to someone else …

Initial posts about librsvg's C to Rust conversion
7 Sept 2017 | original ↗

The initial articles about librsvg's conversion to Rust are in my old blog, so they may be a bit hard to find from this new blog. Here is a list of those posts, just so they are easier to find: Librsvg gets Rusty Porting a few C functions to Rust …

The Magic of GObject Introspection
7 Sept 2017 | original ↗

Before continuing with the glib-rs architecture, let's take a detour and look at GObject Introspection. Although it can seem like an obscure part of the GNOME platform, it is an absolutely vital part of it: it is what lets people write GNOME applications in any language. Let's start with a …

How Glib-rs works, part 2: Transferring lists and arrays
29 Aug 2017 | original ↗

(First part of the series, with index to all the articles) In the first part, we saw how glib-rs provides the FromGlib and ToGlib traits to let Rust code convert from/to Glib's simple types, like to convert from a Glib gboolean to a Rust bool and vice-versa. We also …

How Glib-rs works, part 1: Type conversions
25 Aug 2017 | original ↗

How Glib-rs works, part 1: Type conversions How Glib-rs works, part 2: Transferring lists and arrays How Glib-rs works, part 3: Boxed types During the GNOME+Rust hackfest in Mexico City, Niko Matsakis started the implementation of gnome-class, a procedural macro that will let people implement new GObject classes in …

Correctness in Rust: building strings
17 Aug 2017 | original ↗

Rust tries to follow the "make illegal states unrepresentable" mantra in several ways. In this post I'll show several things related to the process of building strings, from bytes in memory, or from a file, or from char * things passed from C. Strings in Rust The easiest way to build …

GUADEC 2017 presentation
10 Aug 2017 | original ↗

During GUADEC this year I gave a presentation called Replacing C library code with Rust: what I learned with librsvg. This is the PDF file; be sure to scroll past the full-page presentation pages until you reach the speaker's notes, especially for the code sections! You can also get the …

Surviving a rust-cssparser API break
1 Aug 2017 | original ↗

Yesterday I looked into updating librsvg's Rust dependencies. There have been some API breaks (!!!) in the unstable libraries that it uses since the last time I locked them. This post is about an interesting case of API breakage. rust-cssparser is the crate that Servo uses for parsing CSS. Well, more …

Legacy Systems as Old Cities
11 Jul 2017 | original ↗

I just realized that I only tweeted about this a couple of months ago, but never blogged about it. Shame on me! I wrote an article, Legacy Systems as Old Cities, for The Recompiler magazine. Is GNOME, now at 20 years old, legacy software? Is it different from mainframe software …

Setting Alt-Tab behavior in gnome-shell
22 Jun 2017 | original ↗

After updating my distro a few months ago, I somehow lost my tweaks to the Alt-Tab behavior in gnome-shell. The default is to have Alt-Tab switch you between applications in the current workspace. One can use Alt-backtick (or whatever key you have above Tab) to switch between windows in the …

↑ these items are from RSS. Visit the blog itself at https://viruta.org/ to find other articles and to appreciate the author's digital home.