343 Commits

Author SHA1 Message Date
gwenn
1124d4363d Fix clippy warnings 2024-02-24 11:02:09 +01:00
John Vandenberg
52b01e40b2 Fix a few typos 2024-02-01 16:46:59 +08:00
gwenn
7b4612430b Bump bundled SQLite version to 3.45.1 2024-01-31 18:15:32 +00:00
gwenn
c5a79c8af6 Prepare release of libsqlite3-sys version 0.28.0 2024-01-27 21:14:37 +01:00
Georg Semmler
e60d993cc4
Expose the include directory of the bundled sqlite version
This commit exposes the include directory of the bundled sqlite version
via by instructing cargo to set the `DEP_SQLITE3_INCLUDE` enviroment
variable as documented in the cargo book:
https://doc.rust-lang.org/cargo/reference/build-script-examples.html#using-another-sys-crate

This enables other sys crates to rely on the bundled sqlite version and
use it as base for their compilation if they have a (sub-)dependency on
libsqlite3.
2024-01-25 11:39:21 +01:00
gwenn
2db482f224 Bump bundled SQLite version to 3.45.0 2024-01-16 19:55:26 +00:00
gwenn
8a5e2e6f63 Fix clippy warning 2024-01-06 16:46:29 +01:00
gwenn
01a2cc51a5 Drop winsqlite3 feature 2024-01-06 16:35:18 +01:00
gwenn
3c3d7daeb4 Fix uninlined_format_args
cargo clippy --all --all-targets --fix -- -Wclippy::uninlined_format_args
2023-12-23 14:21:23 +01:00
gwenn
c2fbd167de
Merge pull request #1332 from etehtsea/wasi-example
Improve wasm32-wasi support
2023-11-25 18:03:21 +01:00
gwenn
be9741f18e Prepare next release 2023-11-12 13:23:16 +01:00
gwenn
e8c35fce50 Replace ::atomic::Atomic by std AtomicPtr
NoUninit constraint cannot be satisfied
2023-11-11 20:11:37 +01:00
gwenn
1d74ddcc7b Bump atomic dependency version 2023-11-11 15:46:14 +01:00
gwenn
11d0443af1 Regenerate bindgen_bundled_version_ext.rs for version 3.44.0 2023-11-10 17:52:17 +00:00
gwenn
50f6d24185 Merge remote-tracking branch 'origin/master' into loadable_extension 2023-11-10 17:36:58 +00:00
gwenn
2326556d9b Bump bindgen version to 0.69 2023-11-03 19:39:25 +01:00
gwenn
97051f25de Bump bundled SQLite version to 3.44.0 2023-11-03 19:28:08 +01:00
gwenn
7185c01f96
Add new constants introduced by SQLite 3.43.0 2023-10-21 08:46:42 +02:00
gwenn
0438d7606f
Add new constants introduced by SQLite 3.43.0 2023-10-21 08:37:12 +02:00
gwenn
d8c7ad3202 Regenerate bindgen_bundled_version_ext.rs for version 3.43.2 2023-10-16 19:00:55 +02:00
gwenn
74c867d708 Merge remote-tracking branch 'origin/master' into loadable_extension 2023-10-16 18:56:03 +02:00
gwenn
0953cbebd8 Bump bundled SQLite version to 3.43.2 2023-10-12 18:37:26 +02:00
gwenn
7a5c3d5d4f Bump bundled SQLite version to 3.43.1 2023-09-13 16:23:40 +00:00
dependabot[bot]
6b4cc6d2cc
Update bindgen requirement from 0.66 to 0.68
Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) to permit the latest version.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases)
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.66.0...v0.68.1)

---
updated-dependencies:
- dependency-name: bindgen
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 04:42:00 +00:00
gwenn
5e79f84b37 Upgrade SQLite bundled version to 3.43.0 2023-08-26 10:54:26 +00:00
gwenn
3742efe24c Omit deprecated functions 2023-07-15 10:24:51 +02:00
gwenn
f9d69410ef Fix panic at 'SQLite API not initialized or SQLite feature omitted'
`to_sqlite_error` needs `sqlite3_malloc`

```
sqlite> .log on
sqlite> .load target/debug/examples/libloadable_extension.so
Error: error during initialization: SQLite version mismatch: 3014000 < 3042000
```
2023-07-14 15:56:43 +02:00
gwenn
81585a75cb Add Connection::extension_init2 2023-07-09 15:53:03 +02:00
gwenn
92c536b622 Remove parse_macros (fails with wrapper_ext.h) 2023-07-09 14:17:19 +02:00
gwenn
1308cdaa9d Loadable extension 2023-07-09 12:50:49 +02:00
gwenn
60f5cef17b Factorize code in build.rs 2023-07-09 09:21:40 +02:00
gwenn
44edb4b459 Fix clippy warning 2023-07-08 11:11:14 +02:00
gwenn
58113b0777 Simplify bindgen generation
`rusqlite` users cannot use old versions (< 3.8.3) of SQLite anymore.
And `libsqlite3-sys` users should not use SQLITE_DETERMINISTIC when
using SQLite < 3.8.3.
2023-07-08 10:39:36 +02:00
gwenn
518f0195df Tweak bindgen 2023-06-18 11:48:15 +02:00
gwenn
567a871e70 Tweak bindgen 2023-06-17 16:09:53 +02:00
gwenn
a40289de3b Bump bindgen version to 0.66 2023-06-16 18:24:46 +02:00
gwenn
6e9d8eafde Fix type of SQLITE_DESERIALIZE_*, SQLITE_PREPARE_*, SQLITE_SERIALIZE_* 2023-06-04 10:31:44 +00:00
gwenn
9d502c4995 Use SQLITE_PREPARE_PERSISTENT for CachedStatement 2023-06-03 11:17:19 +02:00
gwenn
72f9b0109f Bump bundled SQLite version to 3.42.0 2023-05-31 08:30:58 +00:00
Konstantin Shabanov
5534eb93c6
Improve wasm32-wasi support
[Starting from 3.41.0 SQLite has wasm32-wasi support out of the
box.][0]

- Set `-DSQLITE_THREADSAFE=0`. Fixes:

```
$ wasmtime target/wasm32-wasi/release/examples/persons.wasm
Error: failed to run main module `target/wasm32-wasi/release/examples/persons.wasm`

Caused by:
    0: failed to instantiate "target/wasm32-wasi/release/examples/persons.wasm"
    1: unknown import: `env::pthread_mutexattr_init` has not been defined
```

- Drop `-DSQLITE_OS_OTHER`. Fixes:

```
$ wasmtime target/wasm32-wasi/release/examples/persons.wasm
Error: failed to run main module `target/wasm32-wasi/release/examples/persons.wasm`

Caused by:
    0: failed to instantiate "target/wasm32-wasi/release/examples/persons.wasm"
    1: unknown import: `env::sqlite3_os_init` has not been defined
```

- [Add wasi specific build flags][1]
- Add basic example
- Also, add instructions how to run it against wasm32-wasi.

Using of file databases is also working, though `--mapdir` arg
should be provided to `wasmtime run`.

[0]: https://wasmlabs.dev/articles/sqlite-wasi-support/
[1]: https://github.com/vmware-labs/webassembly-language-runtimes/blob/main/libs/sqlite/wasi-patches/wlr-build.sh#L11
2023-05-25 22:26:56 +06:00
Nop Jiarathanakul
4c6d915d0f add SQLITE_MAX_COLUMN compile option 2023-05-09 13:19:25 -07:00
Stanislav Golubtsov
ef4a0ac09d fix compilation for target wasm32-wasi 2023-05-02 18:32:56 +02:00
icp
b4604f2421
Force linking against system sqlite libs
This commit introduces new env var, LIBSQLITE3_SYS_USE_PKG_CONFIG,
which can be set to non-zero values to force building against sqlite
libraries from the system overriding bundled features.
2023-04-17 01:23:40 +05:30
gwenn
1180a4f943 Fix clippy warning 2023-04-14 20:55:16 +02:00
gwenn
323331eae6 Bump bindgen version 2023-04-14 20:45:37 +02:00
gwenn
8ac4780526
Merge pull request #1310 from gwenn/sqlite3_auto_extension
Fix sqlite3_auto_extension xEntryPoint signature
2023-03-27 19:38:56 +02:00
gwenn
8419b021bd Prepare next release 2023-03-26 10:24:57 +02:00
gwenn
7dac07be13 Rustfmt 2023-03-25 16:15:05 +01:00
gwenn
a5c460a8f7 Fix sqlite3_cancel_auto_extension 2023-03-25 15:38:24 +01:00
gwenn
bef2472bfb Fix sqlite3_auto_extension xEntryPoint signature 2023-03-25 11:47:27 +01:00