River supports Turso

River v0.41 adds support for Turso, a ground-up rewrite of SQLite in Rust.

Last week we talked about how River v0.41 adds a metrics subsystem to River. River v0.41 also ships with another novel feature: support for Turso.

Turso is a project by the same people who built libSQL. Unlike libSQL, which is a straight fork of SQLite, Turso is a ground-up rewrite in Rust that intends to faithfully implement full SQLite compatibility.

As incredible a track record as SQLite has (read about its famous test suite for example, with millions of test cases and 100% branch coverage), it's not a perfect project. It doesn't accept third-party contributions, and its road map is driven by a small core team that the rest of the world has limited visibility into (e.g. a working ALTER COLUMN would sure be nice, but to date has been chronically elusive). Beyond that, there's a strong argument to be made that it needs something like Rust's editions given how many of its out-of-the-box defaults are the opposite of what you'd expect (e.g., want WAL? Better turn that on). There's no guarantee that Turso fixes any of that, but having another close competitor on the block can't hurt in our eyes.

For River's purposes, adding Turso support didn't take much effort. We added it as an additional test target alongside SQLite and libSQL, which we were already testing against. We had to wait for fixes to a few JSON-related bugs and make a few minor syntax tweaks, but it worked well after that.

Turso is under active development, so there may not be many of you using it yet. But if you are, we'd love to know how the integration went, or your thoughts in general on Turso/SQLite as a main database.