0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-07-30 00:51:17 +00:00
Commit Graph

184 Commits

Author SHA1 Message Date
Allan Zhang
0edf5e37ae Fix libsql-ffi build on Windows
libsql-ffi build on Windows has been intermittently broken for a while due _build.rs_ calling `cp` which is not present on Windows.

Timeline:
- 2024-08-10: Issue #1657 was opened.
- 2024-11-14: #1791 was merged. First fix using `#[cfg(windows)]`.
- 2024-11-15: #1791 reverted in 9499c3c for breaking libsql-js on macOS.
- 2024-12-04: 9499c3c was reverted since #1791 was fine and did not cause the macOS problem. Windows build works again.
- 2025-03-17: da54c1b breaks Windows build.
- 2025-03-21: 0.9.1 is released with broken Windows build.
- 2025-03-27: This commit fixes the bug introduced in da54c1b.

This commit fixes a bug introduced by da54c1b. `Command::status()?` was propogating the error so the fallback, `fs::copy`, was never reached.
This is now fixed so libsql-ffi builds again on Windows.

Closes #1657
2025-04-09 15:08:34 -04:00
Pekka Enberg
483a1507d8 Add support for building libsql-ffi on ARM (#2016)
Closes #2015
2025-04-09 14:11:13 +00:00
Jussi Saurio
417d305e15 Allow specifying YYSTACKDEPTH (parser stack depth) limit via env var 2025-04-07 09:44:53 +03:00
Bernd Storath
351b5a4c89 add support for arm 2025-04-04 08:47:54 +02:00
Pekka Enberg
68d5000f9f Make libsql-ffi workspace dependency (#1996) 2025-03-20 11:54:11 +00:00
Pekka Enberg
69370ba9d4 Merge branch 'main' into fix/fixup-markdown-documents 2025-03-20 13:56:52 +02:00
Pekka Enberg
04362acf6d Add libsql-ffi to workspace depedencies 2025-03-20 13:38:11 +02:00
Pekka Enberg
c7fac2bc6b libsql-ffi: Update bundled SQLite 2025-03-20 13:38:11 +02:00
Pekka Enberg
d1c95e227c Revert "Add libsql-ffi to workspace depedencies"
This reverts commit e736e13742.
2025-03-20 12:45:24 +02:00
Pekka Enberg
e736e13742 Add libsql-ffi to workspace depedencies 2025-03-20 12:32:21 +02:00
Pekka Enberg
50b7f69b6f libsql-ffi: Update bundled SQLite 2025-03-19 09:32:39 +02:00
Pekka Enberg
4702da10ad Merge pull request #1981 from bengsparks/cmake-patch
cmake(libsql-ffi): don't use `-msse4.2` `-maes` when compiling for ARM hosts
2025-03-18 16:38:23 +00:00
Levy A.
3ad67a8ecf fix: only write to OUT_DIR 2025-03-17 09:11:08 -03:00
Levy A.
da54c1bf97 fix: try fixing copy, again 2025-03-17 09:11:08 -03:00
Levy A.
5e20bd300c fix: use copy_with_cp everywhere 2025-03-17 09:11:08 -03:00
Levy A.
7a941c6746 fix: add --no-preserve for nix on macos 2025-03-17 09:11:08 -03:00
Levy A.
8408283b37 feat: add support for windows cross-compilation 2025-03-17 09:11:08 -03:00
Levy A.
c74c8eef99 refactor+fix: trying to fix sqlite3mc cross compilation 2025-03-17 09:11:08 -03:00
Levy A.
d09ed8230d fix: cross compilation from aarch64 to x86_64 MacOS 2025-03-17 09:11:08 -03:00
Benjamin Sparks
56ddeb2de8 cmake(libsql-ffi): don't use -msse4.2 -maes when compiling for ARM hosts 2025-03-14 11:06:01 +01:00
Nikita Sivukhin
6d43d459ab build bundles 2025-02-27 13:09:40 +04:00
Nikita Sivukhin
e14762daf5 add libsql-disable-checkpoint-downgrade cargo feature in libsql-ffi crate 2025-02-27 13:08:34 +04:00
Pekka Enberg
2a8507dd5e libsql-ffi: Update bundled SQLite 2025-02-21 10:23:58 +02:00
Pekka Enberg
4ed932daaa libsql-ffi: Update bundled SQLite 2025-02-21 08:36:49 +02:00
Jussi Saurio
90f0751ff8 wal.c: do not ignore the result code of xCb in walCheckpoint
libsql exposes a WAL checkpoint callback that is called once for each
frame and right when checkpointing is about to finish.

before this change, the result code returned by the checkpoint callback
was ignored on the 'finish' invocation, which resulted in the checkpoint
completing successfully despite the callback returning an error.

this commit propagates the callback's error code and thus prevents the
wal_checkpoint() routine from returning SQLITE_OK in cases where the
callback failed.
2025-02-13 23:48:34 +02:00
Josip Igrec
910a649ffa Merge branch 'main' into fix/fixup-markdown-documents 2025-01-31 10:22:00 +01:00
Levy A.
a8c11db984 fix: add sqlite3 includes 2025-01-28 13:01:16 -03:00
Josip Igrec
70efc568b9 Add output from cargo xtask build-bundled 2025-01-23 17:44:48 +01:00
Pekka Enberg
09715e4821 Merge pull request #1929 from tursodatabase/revert-checkpoint-gen-api
Remove libsql_wal_checkpoint_seq_count() API
2025-01-23 11:18:59 +00:00
Pekka Enberg
b272026b90 Revert "libsql-ffi: Update bundled SQLite"
This reverts commit e9e0405a7a.
2025-01-23 13:01:25 +02:00
Glauber Costa
d3a156caf5 bundle SQLean extensions
A common complain with libSQL is how to run extensions. The main
mechanism, with a .so, has a lot of issues around how those .so are
distributed.

The most common extensions are the ones in the sqlean package. We can
improve this experience by bundling them in our sqlite build.

Not all SQLean extensions are kosher: some of them, like fileio, use
the vfs. Others, are deemed too complex.

The extensions included here are a subset that we deem important enough,
and low risk enough, to just be a part of the main bundle.
2025-01-16 22:25:16 -05:00
Pekka Enberg
b8f5e89661 Merge pull request #1876 from tursodatabase/wal-checkpoint-seq-api
Add libsql_wal_checkpoint_seq_count() API
2024-12-17 17:49:53 +00:00
Lucio Franco
aabea5f779 sqlite3: fix missing pager causing SQLITE_MISUSE
This fixes a missing pager that `libsql_pager_codec` expects to not be
null. All this does is add the pager when we call `sqlite3PagerWalInsert`
to the wal frame we want to insert.

Fixes #1867
2024-12-12 21:16:05 -05:00
Pekka Enberg
e9e0405a7a libsql-ffi: Update bundled SQLite 2024-12-11 10:29:48 +02:00
Pekka Enberg
13385969d1 libsql-ffi: Fix build on macOS
The `cp` command does not support `--no-preserve` on macOS.
2024-12-04 17:44:43 +02:00
Pekka Enberg
38cfab7d5d Revert "Revert "Merge pull request #1791 from awakecoding/libsql-ffi-build-cp-fix""
This reverts commit 9499c3c40a. The real
problem is not Windows, but build on macOS. Let's revert this revert and
fix macOS instead.
2024-12-04 17:44:22 +02:00
Pekka Enberg
adb5eeb03f libsql-ffi: Update bundled SQLite code 2024-11-28 16:43:07 +02:00
Pekka Enberg
98a5345794 libsql-sqlite3: Fix libsql_wal_frame_count() for empty databases
If a database is empty, the pagerUseWal() returns false. In that case,
make libsql_wal_frame_count() return zero instead of a logic error.
2024-11-26 15:24:54 +02:00
Pekka Enberg
e2e3a6e85b libsql-ffi: Update bundled SQLite code 2024-11-26 12:22:40 +02:00
Nikita Sivukhin
644a91e5b2 fix comment in code 2024-11-24 18:07:31 +04:00
Nikita Sivukhin
b11c0c5294 build bundles 2024-11-13 00:40:11 +04:00
Pekka Enberg
246667c7fd Merge pull request #1788 from tursodatabase/wal-api
libSQL WAL API
2024-11-11 12:00:39 +00:00
Pekka Enberg
126e582cc0 libsql-ffi: Update bundled SQLite code 2024-11-11 12:44:54 +02:00
Nikita Sivukhin
28cf3d8529 build bundles 2024-10-29 17:46:14 +04:00
Pekka Enberg
61558b2a9e libsql-{sqlite3,ffi}: Add xReadFrameRaw() to the virtual WAL API
This adds a new xReadFrameRaw() function to the virtual WAL API, which
upper layers can use to fetch the full frame, including the page number,
that is useful for appending frames to a WAL.
2024-10-29 13:30:27 +02:00
Pekka Enberg
3ac4aa1689 libsql-{sqlite3,ffi}: Add xFrameCount() to the virtual WAL API 2024-10-29 13:30:27 +02:00
Nikita Sivukhin
f3db0bc827 build bundles 2024-10-29 13:16:23 +04:00
Nikita Sivukhin
80a10f9202 build bundles 2024-09-29 15:17:47 +04:00
Lucio Franco
1de0aaa4d5 libsql: prepare v0.6.0 release 2024-09-20 15:36:46 -04:00
Lucio Franco
3c68620017 ffi: release v0.4.1 2024-09-10 08:42:08 -04:00