Rust development on Ubuntu 24.04 - can't read time-based columns with librust-sqlx-dev

Ubuntu Support Template

Ubuntu Version:
24.04 Server

Problem Description:
I’m doing offline development with Rust 1.80.1 on Ubuntu 24.04, meaning I’m locked to the Canonical packages available on 24.04 with no access to rustup.
I’m running into an issue with the librust-sqlx-dev package (version 0.7.3-3) when trying to read DATETIME and TIMESTAMP columns from MySQL: support for reading these datatypes is gated behind either the chrono or time features.
However, the time crate won’t compile with rustc 1.80, and the 0.7.3 version of the sqlx crate has a drop-chrono patch that removes the chrono feature from the package entirely. This patch is removed in sqlx 0.8.3, but this version is not currently available for Ubuntu 24.04.

As I understand it, my options are:

  • Wait for Canonical to backport sqlx 0.8.3 to Noble or submit a request to someone (who?) to provide this backport
  • Manually download and vendor sqlx 0.8.3
  • Manually implement the required functionality

Are these my only available courses of action? If #1 is an option, who would I submit this request to?

That won’t happen, here’s why:

$ apt info librust-sqlx-dev

Package: librust-sqlx-dev
Version: 0.7.3-3
Priority: optional
Section: universe/rust   <-----
Source: rust-sqlx
Origin: Ubuntu

Packages in “universe” are community-supported and, unless there’s a security issue, don’t get updates unless someone in the community wishes to backport a newer package to the noble-backports repository. That can be read about here: UbuntuBackports - Community Help Wiki

However, if you look at https://launchpad.net/ubuntu/+source/rust-sqlx, you’ll see that the version you require is already in 25.10 and will be included in 26.04 in April.

My recommendation: Use a multipass VM of 25.10 and then upgrade your server to 26.04 after it releases. That will get you what you require much faster than will any backport.

rustup is in the repos: https://launchpad.net/ubuntu/+source/rustup

1 Like

Why does it mean that? Installing Rust from official Rust-provided binaries does not require rustup nor an internet connection.

What version of Rust would you prefer to use instead of 1.80.1?

This topic was automatically closed after 30 days. New replies are no longer allowed.