Skip to content
Rust Search
← EuroRust 2022

Oxidizing Mercurial: the good and the less good

EuroRust
27:09 699 views

Raphaël Gomès Developer and Musician. Working on Mercurial SCM at Octobus Mercurial is a 17 year-old, mainly Python codebase with a bit of C. There are lots of interesting and unexpected challenges that come with rewriting parts of any such software, and some unique to version control systems: from FFI overhead, not reintroducing bugs, testing, mixed encoding issues, to less technical issues like inexperience with Rust and a lack of reviewers, our journey with Rust has not been smooth sailing.

Player unavailable or embedding blocked? Use the YouTube link above.

Other talks by Raphaël Gomès

Rust in Mercurial: The wider benefits

FOSDEM

From its timid introduction to the Mercurial Version Control System back in 2017 to its more than 50k lines of code today, Rust has enabled a wide range of improvements, some of which we wager would have been impossible if not for Rust. This talk shows how we reach far beyond the obvious point of "Rust runs faster than Python". It discusses aspects like maintainability, dependency management, API re-designs, opportunities for more advanced algorithms, on disk data-structures, safe parallelism, etc. We present our rare perspective of working on a 20 year-old codebase with half-a-million lines of Python code, in a software niche with quite extreme goals. Mercurial aims to provide instant-feeling commands with short lived processes for a local database of tens of millions of revisions for millions of files with fully distributed replication.

Sharing memories of Python and Rust

FOSDEM

The Mercurial version control system now has an option for running Rust code to improve performance. In this talk we will explore the challenges of using Rust efficiently inside a performance-sensitive Python project with more than 10 years of backwards compatiblity.