Live data from Hacker News

Limbo: A complete rewrite of SQLite in Rust

turso.tech

51–60 of 238 posts

Re: Limbo: A complete rewrite of SQLite in Rust

#51
post #8

disclosure: I work here. I am happy to answer any questions tl;dr We are rewriting SQLite in Rust. It uses Asynchronous I/O, considers WASM as first class, and has Deterministic Simulation Testing support from the beginning. source: https://github.com/tursodatabase/limbo

Will you release the code into the public domain, like SQLite?

Re: Limbo: A complete rewrite of SQLite in Rust

#52

Earlier quoted context omitted.

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…

Also the very rigid testing makes the rewrite a lot easier to validate.

...as long as you can persuade the keepers of the proprietary test suite to agree to run it against your code.

Re: Limbo: A complete rewrite of SQLite in Rust

#53
post #8

disclosure: I work here. I am happy to answer any questions tl;dr We are rewriting SQLite in Rust. It uses Asynchronous I/O, considers WASM as first class, and has Deterministic Simulation Testing support from the beginning. source: https://github.com/tursodatabase/limbo

How much has Turso raised so far? Rewriting SQLite sounds like it may cost a sum.

Re: Limbo: A complete rewrite of SQLite in Rust

#54
post #39

Clearly still in very early days: uv run --with pylimbo --python 3.13 python Then: >>> import limbo >>> con = limbo.connect("/tmp/content.db") thread ' ' panicked at core/schema.rs:186:18: not yet implemented: Expected CREATE TABLE statement note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace With that environment variable: stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt…

Hey Simon! However early you think it is, I can guarantee it is even earlier =)

If this is just a standard sqlite database that you are trying to open, though, I'd have expected it to work.

Re: Limbo: A complete rewrite of SQLite in Rust

#56
post #8

disclosure: I work here. I am happy to answer any questions tl;dr We are rewriting SQLite in Rust. It uses Asynchronous I/O, considers WASM as first class, and has Deterministic Simulation Testing support from the beginning. source: https://github.com/tursodatabase/limbo

Will you release the code into the public domain, like SQLite?

absolutely not.

We're not fans of public domain, which is one of the things that led us to create libSQL in the first place.

It is MIT.

Re: Limbo: A complete rewrite of SQLite in Rust

#57
post #5

I’ll take the faster c version anyday over the rust. How are those conditional if statements working for you all?

The benchmarks in the post indicate that Limbo is more performant than SQLite, not less.

be careful with that, though. In a lot of ways it is still slower.

The goal with that was just to demonstrate that there's nothing really there that is fundamentally slower, and the perf is already on par in the areas where we spent cycles on.

Re: Limbo: A complete rewrite of SQLite in Rust

#59

Given 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…

>> 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.

Re: Limbo: A complete rewrite of SQLite in Rust

#60
The license is "Copyright 2024 the Limbo authors". How is that possible if Limbo is based on a rewrite?

Do they claim a clean room implementation?

It seems wise of SQLite to close down their test suite. That's a great idea I wish I had heard about earlier.

Post reply on HN