Earlier quoted context omitted.
Seems like a potentially interesting project to get rid of sqlite's compatibility baggage e.g. non-strict tables, opt-in foreign keys, the oddities around rowid tables, etc... as well as progress the dialect a bit (types and domains for instance).
But the article mentions that they intend to have full compatibility: > Our goal is to build a reimplementation of SQLite from scratch, fully compatible at the language and file format level, with the same or higher reliability SQLite is known for, but with full memory safety and on a new, modern architecture.
Limbo: A complete rewrite of SQLite in Rust
141–150 of 238 posts
Re: Limbo: A complete rewrite of SQLite in Rust
#142Earlier quoted context omitted.
Seems like a potentially interesting project to get rid of sqlite's compatibility baggage e.g. non-strict tables, opt-in foreign keys, the oddities around rowid tables, etc... as well as progress the dialect a bit (types and domains for instance).
But the article mentions that they intend to have full compatibility: > Our goal is to build a reimplementation of SQLite from scratch, fully compatible at the language and file format level, with the same or higher reliability SQLite is known for, but with full memory safety and on a new, modern architecture.
Further down the post I actually call out explicitly that we do intend to get rid of some of the baggage.
Re: Limbo: A complete rewrite of SQLite in Rust
#143Earlier quoted context omitted.
That's fully in line with what they're announcing here. It's the announcement of a new project that has passed the prototyping stage, but one that has not reached the 1.0 stage.
And it never will The first 90% is easy, it's the second 90% that is very hard.
In my experience the 10% that doesn't get done is the 10% that people don't care too much about it anyway.
Re: Limbo: A complete rewrite of SQLite in Rust
#144Such a missed opportunity to call it "Lambo"
Re: Limbo: A complete rewrite of SQLite in Rust
#145Earlier quoted context omitted.
The goal here is not to claim that it is faster, though (it isn't, in a lot of other things it is slower and if you run cargo bench you will see) It is to highlight that we already reached a good level of performance this early in the project. Your claim about the programming language having no impact is just false, though. It's exactly what people said back in 2015 when we released Scylla. It was already false then,…
> It is to highlight that we already reached a good level of performance this early in the project. This is the right thing to do. It's a pity so many projects don't keep an eye on performance from the very first day. Getting high performing product is a process, not a single task you apply at the end. Especially in a performance critical system like a database, if you don't pay attention to performance and instead y…
I don't even care about being faster than sqlite, just not being slower, this early, is already the win I'm looking for.
Re: Limbo: A complete rewrite of SQLite in Rust
#146Given the code quality and rigid testing, SQLite is probably the last project that should be rewritten. It'd be great to see all other C code rewritten first!
That was my take when LibSQL was announced. And it still is and would be my take if LibSQL remains C-coded. But a Rust-coded rewrite of SQLite3 or LibSQL is a different story. The SQLite3 business model is that SQLite3 is open source but the best test suite for it is proprietary, and they don't accept contributions to any of either. This incentivizes anyone who needs support and/or new features in SQLite3 to join the…
That's the position of two federal agencies, namely, FBI and CISA. They don't describe how this change will reduce CVEs or why the languages they prefer still produce projects with CVEs.
I don't particularly hold the technical or social acumen of FBI or CISA in particularly high regard and I'm not sure why anyone would by default either. Mostly because they say things like "switch to python!" without once accounting for the fact that python is written in C.
It's an absurd point to invoke as a defense of this idea.
Re: Limbo: A complete rewrite of SQLite in Rust
#147Dunno. Good luck to them, but I never saw a need to rewrite sqlite.
Guessing the shortcomings become starker if you’re spending lots of time in the codebase/building a company on top of it.
So be sure you proceed in such a way that never contributes any money or code back to the original project.
Re: Limbo: A complete rewrite of SQLite in Rust
#148Earlier quoted context omitted.
>> The SQLite3 business model is that SQLite3 is open source This is going to sound pedantic, but SQLite is not Open Source. It's Public Domain. The distinction is subtle, but it is important.
It's a difference only insofar that in many jurisdictions their claim that it's public domain has no legal value. If it was truly public domain (e.g. if the authors were long dead) it would be open source. But far from all places allow you to arbitrarily put things in the public domain. I'm a bit puzzled why SQLite doesn't solve this trivial issue by claiming the code is CC0-licensed. CC0 is made just for that: a ver…
It's $6,000 https://sqlite.org/prosupport.html
Re: Limbo: A complete rewrite of SQLite in Rust
#149They have a process for contributions to follow: you suggest a feature, they implement it. It's far from the only project to take such a stance.
Just in the SQLite “ecosystem” see the contribution policies of Litestream and LiteFS. I don't see people brandishing the ”not open contribution” to Ben's projects.
https://github.com/superfly/litefs?tab=readme-ov-file#contri...
https://github.com/benbjohnson/litestream?tab=readme-ov-file...
Re: Limbo: A complete rewrite of SQLite in Rust
#150Earlier quoted context omitted.
There's still an element of truth in the idea that C is going to be faster by default. There's simply a much lower bar to writing fast (and unsafe) C. Fast Rust demands considerably more thoughtfulness from the programmer (at least for me).
> Fast Rust demands considerably more thoughtfulness from the programmer (at least for me). While fast code requires thoughtfulness regardless of the language, I think rust lets you focus on the fast aspect more because rustc ensures _some_ safety and correctness. I can write fast and very unsafe C code fast, but I write code that just as fast , but safer in rust faster than in C.
Here's a more concrete, albeit irrelevant in practice example from writing most things in both languages:
https://news.ycombinator.com/item?id=42342382#42352053
Implemented in Rust over generic T, you need Wrapping or the equivalent num_traits traits. The implementations for these take borrowed references. Rustc is pretty good at ensuring this becomes pass by value under the hood, but it's imperfect. I found instances of it failing in the test disassembly, even though an implementation for this never has to touch anything but registers. That's performance work that wouldn't have existed in C/C++ for these particular types.