Commit Graph

355 Commits

Author SHA1 Message Date
Pekka Enberg
81da795a66 Turso 0.1.4-pre.6 2025-08-08 16:50:24 +03:00
Pekka Enberg
7e8a84a681 Merge 'turso-sync: js package' from Nikita Sivukhin
This PR introduces `turso-sync-js` package with the following API (see
`./packages/turso-sync-js/example/cloud/example.js`):
```js
const { connect } = require('./sync_engine.js');
const db = await connect({ path: ..., url: ..., authToken: ...});

await (await db.prepare('SELECT * FROM users')).all();
await db.exec("INSERT INTO users VALUES (12345, 'turso-sync')");
await db.sync();
```

Closes #2480
2025-08-08 16:48:18 +03:00
Preston Thorpe
d3e6172516 Merge 'global allocator should not be set for library, only for executables' from Pedro Muniz
We should be allocator-agnostic. It is pretty limiting for us to force a
user to use a particular allocator. This is specially restricting for
`no_std` in the future.

Reviewed-by: bit-aloo (@Shourya742)
Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #2481
2025-08-08 09:45:35 -04:00
Nikita Sivukhin
3f0162307f configure cargo for napi-rs 2025-08-08 15:45:05 +04:00
Nikita Sivukhin
e6a3ee59d2 turso-sync-js package 2025-08-08 15:44:41 +04:00
Pekka Enberg
ba88d17f29 Turso 0.1.4-pre.5 2025-08-08 13:49:06 +03:00
Pekka Enberg
ad70157e74 Turso 0.1.4-pre.4 2025-08-08 11:54:26 +03:00
Pekka Enberg
8d5fb41f5d Turso 0.1.4-pre.3 2025-08-08 10:42:41 +03:00
pedrocarlo
edae65fb5f global allocator should not be set for library, only for executables 2025-08-07 13:41:50 -03:00
Nikita Sivukhin
09daa97150 format fixes 2025-08-06 21:53:03 +04:00
Nikita Sivukhin
b612259a3a more friendly copmletely runtime agnostic turso-sync-engine crate 2025-08-06 19:26:55 +04:00
Pekka Enberg
2913dc4dd4 Turso 0.1.4-pre.2 2025-08-06 10:52:32 +03:00
pedrocarlo
7bf35bcaf4 remove rexpect crate 2025-08-04 15:59:15 -03:00
Pekka Enberg
4aea9372bd Rename liblimbo_sqlite3 to libturso_sqlite3 2025-08-02 11:24:40 +03:00
Pekka Enberg
a67b0a8a1d Merge 'chore: move tx isolation fuzz test to 'tests'' from Jussi Saurio
Closes #2383
2025-08-01 13:50:04 +03:00
Pekka Enberg
994a0e0852 Turso 0.1.4-pre.1 2025-08-01 13:38:12 +03:00
Jussi Saurio
addb067416 chore: move tx isolation fuzz test to 'tests' 2025-08-01 13:02:05 +03:00
Levy A.
e35fdb8263 feat: zero-copy DatabaseHeader 2025-07-30 17:33:59 -03:00
Jussi Saurio
7caef278a5 Merge 'Rewrite the WAL' from Preston Thorpe
closes #1893
Adds some fairly extensive tests but I'll continue to add some python
tests on top of the unit tests.
## Restart:
tested 
- open new DB
- create table and do a bunch of inserts
- `pragma wal_checkpoint(RESTART);`
- close db file
- re-open and verify we can read the wal/repopulate the frame cache
- verify min|max frame
tested 
- open same DB
- add more inserts
- `pragma wal_checkpoint(RESTART);`
- do _more_ inserts
- close
- re-open
- verify checksums/max_frame are valid
- verify row count
## Truncate
tested 
- open new db
- create table and add inserts
- `pragma wal_checkpoint(truncate);`
- close file
- verify WAL file is empty (32 bytes, header only)
- re-open file
- verify content/row count
tested 
- open db
- create table and insert many rows
- `pragma wal_checkpoint(truncate);`
- insert _more_ rows
- close db file
- verify WAL file is valid
- re-open file
- verify we can read entire file/repopulate the frame cache
<img width="541" height="315" alt="image" src="https://github.com/user-
attachments/assets/0470c795-5116-4866-b913-78c07b06b68c" />
```
# header
magic=0x377f0682
version=3007000
page_size=4096
seq=2
salt=ec475ff2-7ea94342
checksum=c9464aff-c571cc22
```

Closes #2179
2025-07-30 18:50:49 +03:00
Jussi Saurio
d5b0d284e6 bindings/rust: add tx isolation fuzz test 2025-07-30 14:58:03 +03:00
Nikita Sivukhin
b78ce17022 properly configure TLS and use default features for rustls/hyper-rustls deps 2025-07-30 11:47:36 +04:00
Nikita Sivukhin
7cf296c7ab update deps 2025-07-30 00:58:36 +04:00
Nikita Sivukhin
298e0b459e fix after rebase 2025-07-29 14:42:51 +04:00
Nikita Sivukhin
bb96ce50fb fix after rebase 2025-07-29 14:42:10 +04:00
Nikita Sivukhin
4b893d1631 small fixes 2025-07-29 14:42:09 +04:00
Nikita Sivukhin
ea2f9faa13 fix build 2025-07-29 14:41:10 +04:00
Pekka Enberg
94dc780669 Turso 0.1.3 2025-07-29 12:37:18 +03:00
Pekka Enberg
a4737f82bc Turso 0.1.3-pre.10 2025-07-29 12:16:02 +03:00
Pekka Enberg
4f4d321822 Turso 0.1.3-pre.9 2025-07-29 10:58:09 +03:00
Pekka Enberg
a254f0ecaa Turso 0.1.3-pre.8 2025-07-29 10:13:30 +03:00
Pekka Enberg
04e7d45ac3 Turso 0.1.3-pre.7 2025-07-29 09:15:03 +03:00
Diego Reis
98bec9868b Remove wasm binding
With napi v3 we can compile our javascript binding to wasm, which can
reduce a lot of maintenance overhead and complexity
2025-07-28 14:48:51 -03:00
Pekka Enberg
016c84ed7d Turso 0.1.3-pre.6 2025-07-28 20:21:24 +03:00
Levy A.
cbb618f0ad feat(javascript): add tracing_subscriber 2025-07-27 21:24:39 -03:00
Pekka Enberg
c7996652fe Merge 'bindings/javascript: Switch to napi v3' from Diego Reis
Switch to napi [v3](https://napi.rs/blog/announce-v3).
With the exception of `Statement.iterate()`,  the behavior is preserved.
I had to temporarily remove it because the trait `Generator` doesn't
supports the new lifetime scoped values, I already brought this issue in
napi's discord server and it should be fixed soon.

Closes #2262
2025-07-25 20:19:37 +03:00
Diego Reis
0f95cf7751 bind/js: Switch to napi v3 2025-07-25 11:45:57 -03:00
Pekka Enberg
76cf3444c6 Turso 0.1.3-pre.5 2025-07-25 13:24:33 +03:00
Pekka Enberg
5018f0b7cb Turso 0.1.3-pre.4 2025-07-24 19:12:28 +03:00
Pekka Enberg
16958f1a44 Turso 0.1.3-pre.3 2025-07-19 08:44:22 +03:00
Glauber Costa
32532b4feb Add a native MCP server
The SQLite command line has facilities to ingest things like csv, and
other formats. But here we are, in 2025, and I asked Claude if Turso's
CLI should, in the same vein, have a native MCP server.

Claude told me: "You're absolutely right!" "That's a great insight!"
"That's a fantastic idea!" and then proceeded to help me with the
boilerplate for this beautiful server.

Rust has a crate, mcp_server, that implements an mcp_server trait.
However, that depends on Tokio, and I think that would bloat our binary
too much.

I have also considered implementing an MCP server that operates on a
directory and allows to list many SQLite files, but figured that would
be a good job for a more advanced and specialized server, not for the
one that comes by default with the CLI. Let's go for simple.
2025-07-17 15:05:29 -05:00
Pekka Enberg
b03b06107b Turso 0.1.3-pre.2 2025-07-16 20:08:46 +03:00
Pekka Enberg
93634d56ba Turso 0.1.3-pre.1 2025-07-16 13:16:57 +03:00
Pekka Enberg
1a8bade9d5 Merge 'Updates to the simulator' from Alperen Keleş
- Add generation for UNION/JOIN
- Rearchitect the oracle calling conventions to simplify the code paths
- Add brute force shrinking option by @echoumcp1

Closes #2049
2025-07-16 11:03:41 +03:00
Pekka Enberg
b7db07cf2d Turso 0.1.2 2025-07-15 11:01:25 +03:00
Pekka Enberg
03d170ca05 Turso 0.1.2-pre.4 2025-07-14 13:21:41 +03:00
Nikita Sivukhin
6e2ccdff20 add btree fuzz tests which generate seed file from scratch 2025-07-14 13:01:15 +04:00
alpaylan
0b3fb2ecdd Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-07-13 11:10:52 -04:00
Pekka Enberg
c454feeba4 Turso 0.1.2-pre.3 2025-07-13 12:55:02 +03:00
alpaylan
8f46bbc77e Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-07-11 01:33:50 -04:00
Pekka Enberg
474c1bff3b Turso 0.1.2-pre.2 2025-07-10 10:10:52 +03:00