Commit Graph

388 Commits

Author SHA1 Message Date
pedrocarlo
962666831b read Profile file from path or use predefined profiles 2025-08-30 11:31:52 -03:00
pedrocarlo
a1407869d4 add serde, schemars and garde to profiles and options 2025-08-30 11:31:52 -03:00
Nikita Sivukhin
009aa479bf improve sync engine 2025-08-27 15:30:00 +04:00
PThorpe92
bcdcd47358 Remove Go bindings (moved to their own repo tursodatabase/turso-go) 2025-08-26 19:13:17 -04:00
PThorpe92
4cf111e3c2 Rename Go driver to turso to not conflict with sqlite3, rename limbo->turso 2025-08-26 14:13:42 -04:00
pedrocarlo
8010b7d0c7 make simulator use sql_generation crate as dependency 2025-08-25 22:59:31 -03:00
pedrocarlo
0285bdd72c copy generation code from simulator 2025-08-25 22:59:31 -03:00
pedrocarlo
b16f96b507 create sql_generation crate 2025-08-25 22:59:31 -03:00
Avinash Sajjanshetty
53f9c0dc7a Add support for lord AEGIS, the fastest and the greatest 2025-08-24 16:15:11 +05:30
Levy A.
0138aade31 tidy error reporting 2025-08-21 15:24:01 -03:00
Levy A.
186e2f5d8e switch to new parser 2025-08-21 15:19:16 -03:00
Nikita Sivukhin
c34d884b6e fix tests 2025-08-21 15:24:21 +04:00
Pekka Enberg
c2208a542a Merge 'Initial pass to support per page encryption' from Avinash Sajjanshetty
This patch adds support for per page encryption. The code is of alpha
quality, was to test my hypothesis. All the encryption code is gated
behind a `encryption` flag. To play with it, you can do:
```sh
cargo run --features encryption -- database.db

turso> PRAGMA key='turso_test_encryption_key_123456';

turso> CREATE TABLE t(v);
```
Right now, most stuff is hard coded. We use AES GCM 256. This
information is not stored anywhere, but in future versions we will start
saving this info in the file. When writing to disk, we will generate a
cryptographically secure random salt, use that to encrypt the page. Then
we will store the authentication tag and the salt in the page itself. To
accommodate this encryption hardcodes reserved space of 28 bytes.
Once the key is set in the connection, we propagate that information to
pager and the WAL, to encrypt / decrypt when reading from disk.

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2567
2025-08-20 11:11:24 +03:00
Pekka Enberg
494ce41d80 Turso 0.1.4 2025-08-20 10:35:35 +03:00
Pekka Enberg
d456db31db Turso 0.1.4-pre.11 2025-08-20 09:32:10 +03:00
Avinash Sajjanshetty
100a0d8e97 Add encryption module
Let's add an encryption module, hard coded to use AES 256 GCM.
Other required parameters are also hard coded and will be made
configurable in the future PRs.

The module is behind a `encryption` feature flag.
2025-08-20 11:38:11 +05:30
Pekka Enberg
8d7ab52471 Turso 0.1.4-pre.10 2025-08-19 19:32:47 +03:00
Pekka Enberg
3a72b478d2 Turso 0.1.4-pre.9 2025-08-18 12:55:45 +03:00
Pekka Enberg
63c22c79cf Merge 'sync-engine: Use SQL over HTTP instead of WAL push' from Nikita Sivukhin
This PR switches from usage of WAL push to SQL over http calls.
As we have sequence of logical changes from CDC - we can just send SQL
statements to the remote. This will give us benefits of more smooth
concurrent usage of sync - because WAL push is very unfriendly in case
of concurrent usages.

Closes #2617
2025-08-16 09:51:15 +03:00
Nikita Sivukhin
979e7da633 use sql-over-http instead of WAL push 2025-08-15 16:59:43 +04:00
TcMits
145300877b merge main 2025-08-15 17:07:21 +07:00
TcMits
9cec83f20b remove unused deps 2025-08-15 16:45:20 +07:00
TcMits
3f19d2aa1a deps 2025-08-15 16:45:18 +07:00
Nikita Sivukhin
615207fb9c use proper event loop in core connection in order to handle all cases properly
- otherwise, in case of schema change, connection will constantly get Database schema is changed error as reprepare logic is implemented in the statement event loop
2025-08-13 17:00:01 +04:00
Nikita Sivukhin
5838efe7dd rename flag to wal_auto_checkpoint_disabled 2025-08-13 15:26:25 +04:00
Nikita Sivukhin
c3c7463193 add debug logs to the memory io 2025-08-13 15:23:18 +04:00
Pekka Enberg
a6247e891f Turso 0.1.4-pre.8 2025-08-12 19:51:42 +03:00
Pekka Enberg
5a65617602 Turso 0.1.4-pre.7 2025-08-12 17:01:47 +03:00
Jussi Saurio
a7c1c8b7d4 Merge 'Use rusqlite 0.37 with bundled SQLite everywhere' from Jussi Saurio
Use the same rusqlite version in every crate and use a bundled up-to-
date sqlite version
(the impetus for this PR is still me trying to figure out why sqlite in
the insert benchmark doesn't seem to be fsyncing, even when instructed)

Closes #2507
2025-08-11 21:07:24 +03:00
Nikita Sivukhin
eb40d4aff6 remove turso-sync as now we have turso-sync-engine 2025-08-11 16:53:39 +04:00
Jussi Saurio
87bf488bbc chore: use rusqlite 0.37 with bundled sqlite everywhere 2025-08-11 15:13:57 +03:00
Piotr Rzysko
40a8058083 Use mimalloc in benchmark.rs 2025-08-11 08:02:35 +02:00
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
TcMits
436d21c81d create turso_parser crate 2025-08-06 15:42:51 +07: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