Commit Graph

127 Commits

Author SHA1 Message Date
Pekka Enberg
17a578a496 bindings/rust: Tokio is not required
The bindings use just async Rust so any async runtime should work.
2025-10-08 11:47:39 +03:00
Dave Warnock
e28ece6950 Update Doc regarding rusqlite compatibility
Make it clear that it's not a drop in replacement for rusqlite as that
isn't async
2025-10-08 08:03:43 +01:00
Avinash Sajjanshetty
306f681966 Add an encryption test in rust bindings 2025-10-02 19:50:10 +05:30
Avinash Sajjanshetty
4ee6bdac1b update Rust bindings to pass encryption options 2025-10-02 18:51:44 +05:30
Avinash Sajjanshetty
593fd5fb88 update Rust bindings to enable experimental encryption 2025-10-02 18:50:57 +05:30
Pekka Enberg
17e07e620a Merge 'fix/vdbe: reset op_transaction state properly' from Jussi Saurio
essentially after the first runthrough of `op_transaction` per a given
`ProgramState`, we weren't resetting the instruction state to `Start´ at
all, which means we didn't do any transaction state checking/updating
after that.
PR includes a rust bindings regression test that used to panic before
this change, and I bet it also fixes this issue in turso-go:
https://github.com/tursodatabase/turso-go/issues/28

Closes #3516
2025-10-02 09:25:23 +03:00
Jussi Saurio
f48165eb72 fix/vdbe: reset op_transaction state properly
essentially after the first runthrough of `op_transaction` per a
given `ProgramState`, we weren't resetting the instruction state
to `Start´ at all, which means we didn't do any transaction state
checking/updating.

PR includes a rust bindings regression test that used to panic before
this change, and I bet it also fixes this issue in turso-go:

https://github.com/tursodatabase/turso-go/issues/28
2025-10-02 08:40:41 +03:00
Jussi Saurio
f06aac6192 bindings/rust: don't panic if user provides invalid parameter
Now returns e.g.:

```rust
SqlExecutionFailure(
  "Invalid argument supplied: Unknown parameter ':email' for query 'INSERT INTO users (email, created_at) VALUES (?, ?)'.
  Make sure you're using the correct parameter syntax - named: (:foo), positional: (?, ?)"
)
```

instead of unwrapping a None value and panicing
2025-10-02 07:42:52 +03:00
Avinash Sajjanshetty
a360efa6e0 enable encryption feature flag by default 2025-09-30 19:04:25 +05:30
TcMits
17c91c1fe2 resolve conflicts 2025-09-22 16:03:52 +07:00
Pekka Enberg
54176d4548 Merge 'Add encryption throughput test' from Avinash Sajjanshetty
```
cargo run --release -- -b 100 -i 100000 --read-ratio 75

cargo run --release -- -b 100 -i 100000 --read-ratio 75 --encryption
```
```
Total time: 629.51s

Transaction throughput: 158.85 txns/sec
Operation throughput: 15885.37 ops/sec
  - Read operations: 7500165 (7500165 found, 0 not found)
  - Read throughput: 11914.29 reads/sec
  - Write operations: 2499835
  - Write throughput: 3971.08 writes/sec
```
vs
```
Total time: 665.05s

Transaction throughput: 150.36 txns/sec
Operation throughput: 15036.47 ops/sec
  - Read operations: 7500165 (7500165 found, 0 not found)
  - Read throughput: 11277.60 reads/sec
  - Write operations: 2499835
  - Write throughput: 3758.87 writes/sec
```

Closes #3230
2025-09-22 07:34:29 +03:00
Avinash Sajjanshetty
0597ea722a Add encryption throughput test 2025-09-20 21:56:58 +05:30
Nikita Sivukhin
c63c820bb7 add busy_timeout pragma 2025-09-19 16:48:12 +04:00
TcMits
96e4c5d241 fix issue 3144 2025-09-16 18:39:45 +07:00
pedrocarlo
3c91ae206b move as many dependencies as possible to workspace to avoid multiple versions of the same dependency 2025-09-15 17:19:36 -03:00
pedrocarlo
3d265489dc modify semantics of busy_timeout to be more on par with sqlite 2025-09-15 02:20:32 -03:00
pedrocarlo
0586b75fbe expose function to set busy timeout duration 2025-09-15 02:20:32 -03:00
PThorpe92
ba1ed72ed8 Add tracing_release feature for benchmarks to compile tracing macros to noops 2025-09-10 09:56:12 -04:00
Pekka Enberg
d6557db3ac bindings/rust: Return error if io_uring requested on non-Linux
Suggested by @sivukhin
2025-09-04 20:00:22 +03:00
Pekka Enberg
ed6d5fd3d7 bindings/rust: Add with_io() method to Builder 2025-09-04 19:14:45 +03:00
Nikita Sivukhin
4653f78356 fix compilation 2025-08-21 18:28:16 +04:00
Nikita Sivukhin
abe3404953 fix build 2025-08-21 15:15:23 +04:00
Pekka Enberg
2963ea7239 bindings/rust: Add Connection::last_insert_rowid() method
Fixes #2670
2025-08-19 17:49:24 +03:00
Nikita Sivukhin
325e990d6e fix clippy 2025-08-13 16:55:23 +04:00
Nikita Sivukhin
0f1d954319 enable indices in Rust SDK 2025-08-13 16:28:45 +04:00
pedrocarlo
b6e200dbed adjust cacheflush calls outside of pager 2025-08-13 10:24:55 +03:00
Nikita Sivukhin
b612259a3a more friendly copmletely runtime agnostic turso-sync-engine crate 2025-08-06 19:26:55 +04:00
Pere Diaz Bou
2392ea1b55 bindings/rust: add with_mvcc option 2025-08-05 11:40:23 +02:00
Nikita Sivukhin
2e23230e79 extend raw WAL API with few more methods
- try_wal_watermark_read_page - try to read page from the DB with given WAL watermark value
- wal_changed_pages_after - return set of unique pages changed after watermark WAL position
2025-08-04 16:55:50 +04:00
Nikita Sivukhin
0adb40534c hind dangerous methods behind conn_raw_api feature 2025-08-04 12:40:28 +04:00
Diego Reis
31eb4403ad Add integration tests for query_row and get 2025-08-01 16:00:32 -03:00
Diego Reis
8a47b9d5a4 Address PR's comments 2025-08-01 16:00:32 -03:00
Diego Reis
572d3bd4ce Simplify Rust API verbosity by implementing Row.get() and
Statement.query_row()
2025-08-01 16:00:32 -03:00
Diego Reis
adb81dd6ce Separate Row and Rows in its own file 2025-08-01 16:00:32 -03:00
Jussi Saurio
86b1232268 chore: enable indexes by default 2025-08-01 15:44:56 +03:00
Jussi Saurio
addb067416 chore: move tx isolation fuzz test to 'tests' 2025-08-01 13:02:05 +03:00
Jussi Saurio
24c8c3430f test/fuzz/tx: add 'PRAGMA wal_checkpoint' to tx isolation fuzzer 2025-08-01 11:28:38 +03:00
pedrocarlo
543cdb3e2c underscoring completions and IOResult to avoid warning messages 2025-07-31 11:51:17 -03:00
Jussi Saurio
6e2218c3ed fix/bindings/rust: return errors instead of swallowing them and returning None 2025-07-31 11:57:17 +03:00
Jussi Saurio
73b56f3917 test/fuzz/tx-isolation: unignore test 2025-07-30 17:25:49 +03:00
Jussi Saurio
d4043595cd test/fuzz/tx-isolation: clippy 2025-07-30 15:02:16 +03:00
Jussi Saurio
d5b0d284e6 bindings/rust: add tx isolation fuzz test 2025-07-30 14:58:03 +03:00
Pekka Enberg
2443b8db3c Merge 'bindings/rust: Add Connection::execute_batch()' from Rohith Suresh
Fixes #2184

Closes #2215
2025-07-30 10:19:03 +03:00
RS2007
282222a39f feat: execute_batch working 2025-07-29 21:24:33 +05:30
RS2007
8affc9d436 Prototyping execute_batch 2025-07-29 21:24:22 +05:30
Jussi Saurio
72bf4a714a bindings/rust: return errors instead of vibecoded numbers 2025-07-29 17:45:15 +03:00
Nikita Sivukhin
76cc8c05a5 add conversion method 2025-07-29 14:41:10 +04: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
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
Nikita Sivukhin
976b67a408 fix clippy 2025-07-28 17:27:52 +04:00