DEV Community

Cover image for Turso, a Bright Future for SQLite Written From Scratch in Rust
Federico Moretti
Federico Moretti

Posted on

Turso, a Bright Future for SQLite Written From Scratch in Rust

SQLite is 25 years old and written in C. Turso is still in beta and written in Rust, but it aspires to replace SQLite’s functionality 1:1. I just tried it and I think the developers’ ambitions are not out of place. This is one of the many examples why I believe Rust is the new C. So much for the so-called «vibe coding».


Turso Is Not Ready for Production, But…

I think I first came across Turso while looking for a database that was both Express-compatible and “serverless”. Of course, SQLite is the first choice that came to mind, but its problem is its compatibility with JavaScript. Node is still working on its implementation, while in Python it’s a whole different story.

In fact, I don’t remember ever using SQLite with JavaScript, while I developed university projects with Python: I even delivered a project using the CLI entirely. That’s why the first thing I did with Turso was install the CLI and try it out to see how it compares to SQLite. I just had to run a command to understand its potential.

Not only it was much faster than SQLite, which I expected, being written in Rust, but (as I’ve already mentioned about the language) its documentation is more mature. Since it’s a new project, born in a radically different era from SQLite, the built-in features are also cutting edge. And at forty I can say it.

It Supports Native Vector Search via SQLite

SQLite supports vector search only through an extension that has become very popular with the rise of generative AI. In fact, among the extension’s supporters is Turso, which has integrated it into its core: both projects are written in Rust. Therefore, no third-party extensions are needed to support it.

This is possible because Turso is responsible for the development of libSQL: a fork of SQLite that promises greater openness to community contributions. I really appreciate this approach and I think I’ll contribute too, after Hacktoberfest. However, it has better built-in RAG support than SQLite.

Today this aspect is strategic, because with LLMs the way of managing data has changed. Neither SQLite nor Turso will ever be able to compete with databases that handle big data, but I think Turso will have its say in many areas. Not just for vector search, of course. What about AI agents?

Built-in Model Context Protocol (MCP) Support

Yes, Turso supports the MCP protocol, exposing a server that listens for one or more of the supported commands. Reading the manual, this does not automatically connect to a database, leaving the user with the option to select an existing one or create a new one. But not only that.

In addition to providing the ability to perform SQL queries, including those that allow you to modify existing data, Turso is integrated with Claude Desktop. You can verify all this simply by running .help from the command line: specifically, .man mcp or .manual mcp returns the information.

Unfortunately, I’m a bit behind in AI-assisted development, mostly for financial reasons, but Claude is one of the subscription options I’ve been considering. Since it follows the standard defined by Anthropic, you can connect to the server with any other service. I’d like to try this with an OSS model.

Looking for Real-Time Visualizations? We’ve Got Them

Anyone who knows me knows I’m certainly not a DBA. I’ve taken several courses in my life, from MySQL to PostgreSQL, from SQLite to MongoDB, but so far I’ve never really gotten too passionate about the subject. Was it my teachers’ fault? Now it’s not the most important thing. What matters is the result.

Turso offers a Live Materialized View system that offers incremental updates – called Incremental View Maintenance (IVM) – to reduce overheads. Let’s talk about efficiency. The goal is to reduce the burden of executions by processing only what’s necessary: conceptually flawless.

For non-experts like myself, the explanation in Turso’s manual is perfect: if you’re looking at a view that shows the sum of hundreds of rows, when you add one, you don’t need to add them all from the beginning. The view will be updated adding only the missing row. It’s more complicated than that, but you get the idea.


I’m enthusiastic about Turso, but this isn’t an ad. I’ve never contributed a single line of code to the project, and I’m not paid to speak highly of it. I’m just happy that someone has come up with this solution, and if I have the time, I’d love to contribute. It certainly has its limitations, but we’ll discover them along the way.

Top comments (0)