Commit Graph

6692 Commits

Author SHA1 Message Date
Nikita Sivukhin
bb96ce50fb fix after rebase 2025-07-29 14:42:10 +04:00
Nikita Sivukhin
4d6fe905b8 fix clippy 2025-07-29 14:42:10 +04:00
Nikita Sivukhin
4b893d1631 small fixes 2025-07-29 14:42:09 +04:00
Nikita Sivukhin
4dc217c41a fix clippy 2025-07-29 14:41:35 +04:00
Nikita Sivukhin
134d5e8e2e add simple readme 2025-07-29 14:41:35 +04:00
Nikita Sivukhin
58134052e6 cleanup cargo.toml 2025-07-29 14:41:35 +04:00
Nikita Sivukhin
76cc8c05a5 add conversion method 2025-07-29 14:41:10 +04:00
Nikita Sivukhin
ea2f9faa13 fix build 2025-07-29 14:41:10 +04:00
Nikita Sivukhin
40ded34ef6 add internal DatabaseTape types 2025-07-29 14:40:14 +04:00
Nikita Sivukhin
841bbe3f77 add CDC types 2025-07-29 14:40:14 +04:00
Nikita Sivukhin
b27bc05c7d introduce turso-sync package with simple implementation of DatabaseTape 2025-07-29 14:40:14 +04:00
Pekka Enberg
8adc807cd7 Merge 'Change function signatures to return IO Completions' from Pedro Muniz
Changes a couple of function signatures to return `Completion`. Also, I
changed `Completion` to be internally `Arc` to abstract the `Arc`
implementation detail, and to be able to attach a `#[must_use]` to the
`Completion` struct, so that cargo check can show us where we are not
tracking completions in the code. I also attached a `#[must_use]` to
`IOResult` so that we can see the places that we are not propagating or
waiting for I/O, demonstrating locations where functions should be
reentrant and are not.
Also, while we are with this refactor in progress I want to relax the
Clippy CI lint on unused_variables.

Closes #2309
2025-07-29 12:41:14 +03:00
Pekka Enberg
94dc780669 Turso 0.1.3 2025-07-29 12:37:18 +03:00
Pekka Enberg
0e0fe8739f Update CHANGELOG.md 2025-07-29 12:37:10 +03:00
Pekka Enberg
2d2f416e2c Revert "bindings/javascript: Add optional dependencies"
This reverts commit 9d7a77efde. It does
not work because the native packages don't yet exists at that point.
Let's fix the Github workflows instead.
2025-07-29 12:36:12 +03:00
Pekka Enberg
150e888cc0 Merge branch 'main' of https://github.com/tursodatabase/limbo 2025-07-29 12:16:34 +03:00
Pekka Enberg
a4737f82bc Turso 0.1.3-pre.10 2025-07-29 12:16:02 +03:00
Pekka Enberg
9d7a77efde bindings/javascript: Add optional dependencies 2025-07-29 12:15:43 +03:00
Pekka Enberg
604ed4a13d Fix typo on manual.md 2025-07-29 11:47:20 +03:00
Pekka Enberg
532a014557 docs: Add JavaScript API to the manual 2025-07-29 11:45:12 +03:00
Pekka Enberg
4f4d321822 Turso 0.1.3-pre.9 2025-07-29 10:58:09 +03:00
Pekka Enberg
ae91a4ab6b bindings/javascript: Add index.js and sqlite3-error.js to package
...won't work without them...
2025-07-29 10:57:36 +03:00
Pekka Enberg
a254f0ecaa Turso 0.1.3-pre.8 2025-07-29 10:13:30 +03:00
Pekka Enberg
990bd41918 Merge 'bindings/javascript: Generate native npm packages at publish' from Pekka Enberg
Use the `napi create-npm-dirs` command to create the native packages and
remove the manually created ones. Unlocks wasm publish.

Closes #2316
2025-07-29 10:12:56 +03:00
Pekka Enberg
57a8c46560 bindings/javascript: Generate native npm packages at publish
Use the `napi create-npm-dirs` command to create the native packages and
remove the manually created ones. Unlocks wasm publish.
2025-07-29 10:00:06 +03:00
Pekka Enberg
04e7d45ac3 Turso 0.1.3-pre.7 2025-07-29 09:15:03 +03:00
Pekka Enberg
94e2d3a004 Merge 'perf: fix logic error in is_simple_count()' from Jussi Saurio
```
Execute `SELECT count() FROM users`/limbo_execute_select_count
                        time:   [15.635 µs 15.676 µs 15.730 µs]
                        change: [-96.011% -95.991% -95.972%] (p = 0.00 < 0.05)
                        Performance has improved.
```
Performance has improved.
Closes #2313

Closes #2314
2025-07-29 09:14:48 +03:00
Pekka Enberg
8d5fdc3a9e Merge 'Replace custom wasm bindings with napi-rs' from Diego Reis
With napi v3 we can compile our javascript binding to wasm, which can
reduce a lot of maintenance overhead and complexity.
EDIT: Some caveats:
- Extension loading is disabled;
- Only works for in-memory, I think to make file creation works we would
need another IO implementation. I can work on that but want to keep the
PR small.

Closes #2307
2025-07-29 09:14:21 +03:00
Jussi Saurio
574c15b5e4 perf: fix logic error in is_simple_count() 2025-07-29 09:11:54 +03:00
Diego Reis
738dec0a72 Address PR's comments
https://github.com/tursodatabase/turso/pull/2307
2025-07-28 17:07:34 -03:00
Diego Reis
25eb6f51aa Dinamically set cmake's parallel level based on the amount of cpus
available
2025-07-28 17:07:18 -03:00
pedrocarlo
3831e0db39 convert must_use compile warnings to unused_variables to track locations where we need to refactor in the future 2025-07-28 16:09:26 -03:00
pedrocarlo
3aba5821fc change clippy in CI to allow unused variables 2025-07-28 15:56:37 -03:00
pedrocarlo
d30c7d54c8 change all Arc<Completion> to Completion 2025-07-28 15:32:45 -03:00
pedrocarlo
7789c569a0 make Completion implementation contain an inner Arc<CompletionInner> so that we can must_use the Completion struct 2025-07-28 15:31:42 -03:00
pedrocarlo
617254116d begin_read_page should return completions 2025-07-28 15:31:42 -03:00
pedrocarlo
28d6245440 begin_write_btree_page should return completion 2025-07-28 15:31:42 -03:00
pedrocarlo
3104e3fee5 adjust DatabaseStorage trait to return completions 2025-07-28 15:31:42 -03:00
pedrocarlo
0088e3e1a9 must_use IOResult 2025-07-28 15:31:42 -03:00
Diego Reis
bd57b1dd56 workflow: Add wasm target through rustup 2025-07-28 15:03:25 -03:00
Diego Reis
bab10909c3 Disable extension loading for wasm
We should enable it later when wasm become more mature
2025-07-28 14:49:07 -03:00
Diego Reis
9de48c3926 Setup workflow for wasm
Highly inspirated on
https://github.com/Brooooooklyn/Image/blob/main/.github/workflows/CI.yml
2025-07-28 14:48:52 -03:00
Diego Reis
0346c65a72 Fix clippy 2025-07-28 14:48:52 -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
Pekka Enberg
e2d4cbbe48 Merge 'core: Enforce shared database object per database file' from Pekka Enberg
We need to ensures that there is a single, shared `Database` object per
a database file. We need because it is not safe to have multiple
independent WAL files open because coordination happens at process-level
POSIX file advisory locks.
Fixes #2267

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #2299
2025-07-28 19:34:35 +03:00
Pekka Enberg
c7a45c2273 Merge 'bindings/rust: Add WAL API support' from Nikita Sivukhin
Extend rust `turso-db` bindings with WAL API methods and also extend
result of `wal_insert_frame` method to return `WalInsertInfo` struct.

Closes #2305
2025-07-28 19:34:16 +03:00
Pekka Enberg
50e03ee90e core: Clean up Connection::open_with_flags()
Co-authored-by: bit-aloo <84662239+Shourya742@users.noreply.github.com>
2025-07-28 19:16:01 +03:00
Pekka Enberg
ab1a152100 core: Enforce single shared database object per database file
We need to ensures that there is a single, shared `Database` object per
a database file. We need because it is not safe to have multiple
independent WAL files open because coordination happens at process-level
POSIX file advisory locks.

Fixes #2267
Co-authored-by: ultraman <sunhuayangak47@gmail.com>
2025-07-28 19:13:53 +03:00
Pekka Enberg
9b67eb0e77 core: Fix transaction cleanup in Connection::close() 2025-07-28 19:13:53 +03:00