0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-08-13 14:52:56 +00:00
Commit Graph

34 Commits

Author SHA1 Message Date
Pekka Enberg
2d0aca1c2b sqlite3, ext/crr: Link math library for sqrt()
The vector search code needs sqrt() so let's make sure it's there.
2024-06-20 09:22:01 +03:00
Levy A
e349a06961 Make libsql-ffi's build more friendly to sandboxed environments. (#1478)
fix: prevent out_path from inheriting the mode of source bindgen.rs
2024-06-18 12:55:36 +00:00
Pekka Enberg
a2b2b9e00a libsql-sqite3: Fix sqlite3_get_autocommit() export in Wasm (#1186) 2024-03-11 14:26:37 +00:00
Avinash Sajjanshetty
d178de8f07 bugfix: reset modifications of sqlite3_vtab (#1027)
* Remove `libsql_module` field from `sqlite3_vtab`

* remove `libsql_module` struct

Also removed the associated functions `libsql_create_module_v2`, `libsql_create_module` functions'.

The `libsql_module` had a function `xPreparedSql` which is now moved to `sqlite_module`. The `sqlite_module` might get changed in the upstream, so added some padding space for our custom functions

* generate ffi bindings

* Add a github workflow to test crsqlite

* fix crsqlite: remove `pLibsqlModule` references

* Add tests for sqlite-vss extension
2024-02-15 18:18:30 +00:00
ad hoc
a72c066a8e Wal related changes (#996)
wal extensions
2024-02-06 17:44:23 +00:00
Piotr Sarna
87ebafccc3 Merge pull request #885 from tursodatabase/penberg/wasm-autocommit
libsql-sqlite3: Export more API functions in Wasm
2024-01-16 10:39:54 +00:00
Pekka Enberg
12cab8ae52 libsql-sqlite3: Export sqlite3_last_insert_rowid() in Wasm 2024-01-15 12:59:13 +02:00
Pekka Enberg
566434c339 libsql-sqlite3: Export sqlite3_get_autocommit() in Wasm
We need the `sqlite3_get_autocomit()` helper in the TypeScript SDK, for
example. The fact that it's not exported seems to be just an omission so
let's add it.
2024-01-11 11:32:40 +02:00
Matt
682d42783d fix missing define for cases where we build a loadable rather than static libsql extension 2023-12-21 15:08:39 -05:00
Matt
f42bd234c6 pull in latest cr-sqlite changes 2023-12-21 15:05:06 -05:00
Matt
7a3723663b tweaks to get compiling again after libsql updates 2023-12-12 09:58:03 -05:00
Matt
28bb1bc621 update cr-sqlite to v0.16.2 2023-12-12 09:46:49 -05:00
ad hoc
217ecb84b5 sqlite3 virtual wal v2
Refactor of the virtual wal API. Drop global wals in favor of passing
the wal implementation as an argument to libsql_open.

The WAL interface is split in two sets of virtual methods:
- `create_wal` is passed when opening a sqlite connection. It's role is
  to instantiate a wal.
- `libql_wal` is the wal itself, created by the `create_wal`.

The sqlite3_wal and `sqlite3_create_wal` implementation are completely
decoupled from the wal implementation. They are the default
implementation when using the traditional open methods, and
sqlite3_create_wal is exposed as a global variable, and can be composed
with other wal implementations.
2023-11-30 11:24:47 +01:00
Piotr Sarna
a56ee2f615 ext/wasm: fix SQLTester path
It was moved incorrectly due to the migration of the C API
to libsql-sqlite3/ subdirectory.
2023-11-29 16:53:59 +01:00
Piotr Sarna
d89f0b4d8c wasi: add virtual WAL stub
On top of a special VFS, `make wasi` now also compiles-in
a specialized virtual WAL methods module. It doesn't do anything
right now (just falls back to the regular implementation),
but can be used to call back to the host, inject hooks, etc.
2023-11-29 09:27:24 +01:00
Piotr Sarna
822b2e1b81 Merge pull request #712 from psarna/extwasmwal
ext/wasm: allow WAL mode
2023-11-28 08:37:48 +00:00
Piotr Sarna
dfa4ce43c0 ext/wasm: allow WAL mode
All the groundwork was there for WASI anyway.
2023-11-28 09:26:28 +01:00
Piotr Sarna
1445e42483 wasi: add poor man's microbenchmark 2023-11-28 09:00:49 +01:00
Piotr Sarna
a5cd4f3d81 wasi: refactor to libsql-wasi crate
The crate still has a main.rs file for demo purposes,
but the logic is extracted to a library.
2023-11-27 09:49:33 +01:00
Piotr Sarna
3b0d30f7af wasi,demo: add creating a table 2023-11-26 14:19:50 +01:00
Piotr Sarna
52bf745b32 apply clippy 2023-11-26 14:17:16 +01:00
Piotr Sarna
7cb1eee19c wasi: implement the rest of VFS 2023-11-26 14:17:16 +01:00
Piotr Sarna
d2c3b1eadc wasi: add close() 2023-11-26 14:17:16 +01:00
Piotr Sarna
0bbf971c61 wasi: add write support 2023-11-26 14:17:16 +01:00
Piotr Sarna
9974e2c745 wasi: implement stub for reading files 2023-11-26 14:17:16 +01:00
Piotr Sarna
6113da3db9 wasi: ensure exclusive locking mode and WAL journaling 2023-11-26 14:17:16 +01:00
Piotr Sarna
15a6e43c3c wasi: add WASI demo stub
It's far from working, but it already properly calls back
from a WebAssembly instance to the host for VFS operations.
We also want the same for virtual WAL and we'll have a solid foundation
for running libSQL in a Wasm runtime.
2023-11-26 14:17:16 +01:00
Piotr Sarna
dc75074a37 wasi: add WASI VFS stub 2023-11-26 14:17:16 +01:00
Matt
02a5af3040 move libsql specific vtab methods to fix #632 2023-11-17 11:10:33 -05:00
Piotr Sarna
0dfca64aa3 Merge tag 'version-3.44.0' into HEAD 2023-11-15 14:46:34 +01:00
ad hoc
a9481c8326 remove unused deps 2023-10-30 17:26:20 +01:00
Matt
a55c84f33c ext/crr: update to 0.15.1 of cr-sqlite
Based on https://github.com/tursodatabase/libsql/pull/434
and rebased.
2023-10-18 13:46:23 +02:00
ad hoc
e7ca93a902 fix ci 2023-10-16 15:25:18 +02:00
ad hoc
bf899d0b9a restructure repository 2023-10-16 13:58:16 +02:00