The semver trick


#1

The “semver trick” (formerly known as “the @dtolnay trick”) refers to publishing a breaking change to a Rust library without requiring a coordinated upgrade across its downstream dependency graph.


https://github.com/dtolnay/semver-trick

The link explains how it works using libc as an example.

This could be applicable to libc (rust-lang/libc#547), log (rust-lang-nursery/log#148), url, and lots of other foundational libraries as the Libs Blitz begins to yield 1.0 crates. Hopefully this technique can mitigate some fraction of drawn-out ecosystem-wide upgrades of the sort that we have experienced with libc and pre-1.0 serde in the past.


#2

It will always be the dtolnay trick to me :stuck_out_tongue: