Avinash Sajjanshetty
9e663c7f46
Add IOContext to carry encryption/checksum ctx
2025-08-27 21:33:05 +05:30
Pekka Enberg
22c9cb6618
s/PerConnEncryptionContext/EncryptionContext/
2025-08-24 08:17:20 +03:00
Pekka Enberg
1b89273f10
Merge 'refactor encryption module and make it configurable' from Avinash Sajjanshetty
...
Previously, the encryption module had hardcoded a lot of things. This
refactor makes it slightly nice and makes it configurable.
Right now cipher algorithm is assumed and hardcoded, I will make that
configurable in the upcoming PR
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>
Closes #2722
2025-08-24 08:16:28 +03:00
Pekka Enberg
2c68613709
bindings/javascript: Fix blob type handling
2025-08-22 14:17:40 +03:00
Avinash Sajjanshetty
3090545167
use encryption ctx instead of encryption key
2025-08-21 22:36:32 +05:30
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
Avinash Sajjanshetty
40a209c000
simplify feature flag usage for encryption
2025-08-20 12:49:38 +05:30
Pekka Enberg
d456db31db
Turso 0.1.4-pre.11
2025-08-20 09:32:10 +03:00
Avinash Sajjanshetty
fc3b76de1b
fix Database storage for WASM bindings
2025-08-20 11:47:25 +05:30
Pekka Enberg
8d7ab52471
Turso 0.1.4-pre.10
Build & publish @tursodatabase/database / stable - wasm32-wasip1-threads - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / stable - aarch64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / stable - x86_64-apple-darwin - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / stable - x86_64-pc-windows-msvc - node@20 (push) Waiting to run
Build & publish @tursodatabase/database / Test bindings on x86_64-apple-darwin - node@20 (push) Blocked by required conditions
Build & publish @tursodatabase/database / Build universal macOS binary (push) Blocked by required conditions
Build & publish @tursodatabase/database / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / lint (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / linux (x86_64) (push) Waiting to run
Python / macos-x86_64 (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / test-sqlite (push) Waiting to run
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Build & publish @tursodatabase/database / Test bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
Python / sdist (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
turso-serverless / build (push) Has been cancelled
2025-08-19 19:32:47 +03:00
Pekka Enberg
54b4fdaa7d
javascript: Implement transactions API
2025-08-19 16:35:44 +03:00
Pekka Enberg
387d384394
javascript: Implement Statement.columns()
2025-08-19 16:35:44 +03:00
Pekka Enberg
5002539b04
javascript: Implement safe integers
2025-08-19 16:35:44 +03:00
Pekka Enberg
6b59bcd51e
javascript: Fix Statement.get() for boundary values
2025-08-19 16:35:44 +03:00
Pekka Enberg
692323ae9b
bindings/javascript: Rename @tursodatabase/database/sync to compat
...
We already have a `@tursodatabase/sync` package so let's make the name of the
better-sqlite3 compatibility API package stand out.
2025-08-19 13:20:34 +03:00
Pekka Enberg
976403b080
bindings/javascript: Add TypeScript declarations to package
...
Fixes #2621
2025-08-19 12:34:49 +03:00
Pekka Enberg
3a72b478d2
Turso 0.1.4-pre.9
2025-08-18 12:55:45 +03:00
PThorpe92
cc2fed3297
Remove copy_to API from file IO trait
2025-08-14 21:31:13 -04:00
PThorpe92
3c088dda59
Update callsites of copy_to Database impl
2025-08-14 21:31:13 -04:00
Jussi Saurio
c75e4c1092
Fix non-4096 page sizes by making WAL header lazy
2025-08-14 12:40:58 +03:00
Jussi Saurio
ee58b7bd86
Add fn read_header() to DatabaseStorage trait
2025-08-14 12:40:58 +03:00
Nikita Sivukhin
bfa33a27e2
enable indices in database JS sdk
2025-08-13 15:55:40 +04:00
Pekka Enberg
a6247e891f
Turso 0.1.4-pre.8
2025-08-12 19:51:42 +03:00
Pekka Enberg
475799b3e9
Unify JavaScript package README files
2025-08-12 19:30:02 +03:00
Pekka Enberg
269b23ece5
Merge branch 'main' of https://github.com/tursodatabase/limbo
2025-08-12 17:08:30 +03:00
Pekka Enberg
5a65617602
Turso 0.1.4-pre.7
2025-08-12 17:01:47 +03:00
Pekka Enberg
96673a54a8
bindings/javascript: Add async connect() function
...
Let's make the API symmetric with libSQL and serverless drivers.
2025-08-12 11:39:59 +03:00
Pekka Enberg
81da795a66
Turso 0.1.4-pre.6
2025-08-08 16:50:24 +03:00
Pekka Enberg
ba88d17f29
Turso 0.1.4-pre.5
JavaScript / stable - wasm32-wasip1-threads - node@20 (push) Waiting to run
JavaScript / stable - aarch64-apple-darwin - node@20 (push) Waiting to run
JavaScript / stable - x86_64-apple-darwin - node@20 (push) Waiting to run
JavaScript / stable - x86_64-pc-windows-msvc - node@20 (push) Waiting to run
JavaScript / stable - x86_64-unknown-linux-gnu - node@20 (push) Waiting to run
JavaScript / Test bindings on x86_64-apple-darwin - node@20 (push) Blocked by required conditions
JavaScript / Test bindings on Linux-x64-gnu - node@20 (push) Blocked by required conditions
JavaScript / Build universal macOS binary (push) Blocked by required conditions
JavaScript / Publish (push) Blocked by required conditions
Python / configure-strategy (push) Waiting to run
Python / test (push) Blocked by required conditions
Python / lint (push) Waiting to run
Python / linux (x86_64) (push) Waiting to run
Python / macos-x86_64 (x86_64) (push) Waiting to run
Python / macos-arm64 (aarch64) (push) Waiting to run
Python / sdist (push) Waiting to run
Python / Release (push) Blocked by required conditions
Rust / cargo-fmt-check (push) Waiting to run
Rust / build-native (blacksmith-4vcpu-ubuntu-2404) (push) Waiting to run
Rust / build-native (macos-latest) (push) Waiting to run
Rust / build-native (windows-latest) (push) Waiting to run
Rust / clippy (push) Waiting to run
Rust / simulator (push) Waiting to run
Rust / test-limbo (push) Waiting to run
Rust / test-sqlite (push) Waiting to run
Rust Benchmarks+Nyrkiö / bench (push) Waiting to run
Rust Benchmarks+Nyrkiö / clickbench (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h-criterion (push) Waiting to run
Rust Benchmarks+Nyrkiö / tpc-h (push) Waiting to run
Rust Benchmarks+Nyrkiö / vfs-bench-compile (push) Waiting to run
2025-08-08 13:49:06 +03:00
Pekka Enberg
f2b2e4d4d8
Rename JavaScript package to @tursodatabase/database
2025-08-08 13:22:10 +03:00
Pekka Enberg
ad70157e74
Turso 0.1.4-pre.4
2025-08-08 11:54:26 +03:00
Pekka Enberg
5b578dd790
bindings/javascript: Fix "npm publish" to build the package
2025-08-08 11:53:58 +03:00
Pekka Enberg
8d5fb41f5d
Turso 0.1.4-pre.3
2025-08-08 10:42:41 +03:00
Pekka Enberg
f7eb6c2cee
Turso v0.1.4-pre.3
2025-08-08 10:42:38 +03:00
Pekka Enberg
7a09eb0d4c
Merge 'Fix JavaScript bindings packaging' from Nikita Sivukhin
...
This PR configure `#entry-point` import alias for javascript bindings in
order to use `browser.js` napi-rs generated file in browser context.
Also, this PR forces napi-rs to emit `index.js` entrypoint using ESM and
also use typescript for writing our wrapper code around napi-rs
bindings.
In order to make behaviour consistent when lib is imported through ESM
or CommonJS this PR also replace default export of `Database` by named
on. The problem is that `export default Database` will be logically
equivalent to `modules.export.default = Database` which is not the same
thing as `modules.export = Database` and this will need to access
additional `.default` field with CommonJs style imports (e.g. `new
require('@tursodatabase/turso').default(...)`). In order to remove this
difference - I just replaced default export with named one.
Closes #2488
2025-08-08 10:42:21 +03:00
Nikita Sivukhin
eec679b00b
fix package.json one more time
2025-08-08 10:34:11 +04:00
Pekka Enberg
d32b63d135
bindings/javascript: Update yarn lock file
2025-08-08 09:23:19 +03:00
Pekka Enberg
5ef58db941
bindings/javascript: Fix npm run build
...
Fixes the following error:
```
This is not the tsc command you are looking for
To get access to the TypeScript compiler, tsc, from the command line either:
- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from un-installed packages
```
2025-08-08 09:22:31 +03:00
Nikita Sivukhin
ba6bf7057e
fix package.json
2025-08-08 09:59:52 +04:00
Nikita Sivukhin
9b892828eb
fix package.json
2025-08-08 01:01:40 +04:00
Nikita Sivukhin
92f95f2580
update example
2025-08-08 00:48:20 +04:00
Nikita Sivukhin
dd347fb3e3
simplify setup by emiting index.js in ESM style from napi
2025-08-08 00:47:37 +04:00
PThorpe92
04b40b4cf5
Impl copy_to for Database impl in JS bindings
2025-08-07 16:27:08 -04:00
Nikita Sivukhin
b8f2ff293b
set more fresh lib version
2025-08-07 18:21:29 +04:00
Nikita Sivukhin
7d235953bb
add open field
2025-08-07 16:28:02 +04:00
Nikita Sivukhin
e11184ff1d
fix re-exports
2025-08-07 16:28:02 +04:00
Nikita Sivukhin
d1cd294e94
setup dual publish for commonjs/esm modules and properly route browser/node usages to the correct napi binary entrypoint
2025-08-07 16:28:02 +04:00
Nikita Sivukhin
1a2a1a9ca4
adjust javascript turso bindings for reuse in turso-sync-js package
2025-08-07 16:28:02 +04:00
Pekka Enberg
ab7b0dd1aa
bindings/javascript: Implement Statement.iterate()
2025-08-07 14:28:34 +03:00