Commit Graph

65 Commits

Author SHA1 Message Date
Thom Chiovoloni
a2db66ee3e Add in_gecko feature to libsqlite3-sys to bypass linking. 2020-04-03 13:37:56 -07:00
gwenn
f971c6e625 Fix clippy warnings 2020-03-14 07:41:57 +01:00
gwenn
15fc3b4b71 Clippy + rust fmt 2020-02-22 11:50:00 +01:00
gwenn
17759a912e Ignore PATH change
Cargo itself changes the PATH.
So `libsqlite3-sys` is always rebuilt on Windows platform.
To avoid this, we ignore PATH change.
If the PATH has been modified in such a way that a different SQLite library is found,
you will have to also modify SQLITE3_LIB_DIR to make cargo rebuild `libsqlite3-sys`

Fix #435.
2020-02-08 10:25:52 +01:00
Thom Chiovoloni
c70d148542 Remove most of the code using feature=bundled as a version check 2020-01-14 08:11:36 -08:00
Thom Chiovoloni
844839d9a5 Allow crates with a direct dep on libsqlite3-sys to know if sqlcipher has been enabled 2020-01-08 04:11:39 -08:00
gwenn
2d25b34428 Fix some Clippy warnings 2019-12-19 20:08:04 +01:00
gwenn
08e32444c9 Cleanup use statements 2019-08-17 08:18:37 +02:00
gwenn
e4fecf7fb8 Rustfmt 2019-08-09 20:03:46 +02:00
Richard Dodd
a50d37bd3a Handle old versions of visual studio 2019-07-28 17:05:34 +01:00
gwenn
b9a4628b47 [ci skip] rustftmt 2019-06-25 20:40:28 +02:00
kpcyrd
73f1ef817f Add bundled-windows feature 2019-06-21 06:43:39 +02:00
gwenn
db74fda4d8 [ci skip] rustfmt 2019-06-02 09:12:51 +02:00
Julius de Bruijn
bf0eea5d60 Rerun build if max vars or exprs change in the env 2019-05-15 20:23:20 +02:00
Julius de Bruijn
d034cd56b7 Get MAX_VARIABLE_NUMBER and EXPR_DEPTH as env variables 2019-05-15 18:41:23 +02:00
Julius de Bruijn
4b9295c186 Increase bundled SQLite variables and depth
We've been hitting the default `MAX_VARIABLE_NUMBER` and
`MAX_EXPR_DEPTH` with quite basic tests here in Prisma. I was able to
run the tests by using the Arch Linux packaged libsqlite3, but when
turning on the bundled version I was able to get my test to crash with
this test project:

https://github.com/pimeys/sqlite_parameter_test

Now taking a look how Arch Linux builds sqlite, I was able to find two
flags fixing the issue:

https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/sqlite#n35

I think it would be safe to include them in rusqlite.
2019-05-15 10:33:22 +02:00
Thom Chiovoloni
fe80b51e89 Allow specifying both sqlcipher and bundled.
This is useful because currently, when using `rusqlite` in a Cargo
workspace with one crate that uses `sqlcipher` and another that uses
`bundled`, a build error will be triggered by an unqualified `cargo
build` (as cargo will use the union of all features enabled by crates in
the workspace).

Instead of panicing, this just emits a warning, before (mostly) ignoring
that the `bundled` feature was specified. Note: in this configuration,
we still use our bundled bindings, to avoid changing `rusqlite` to
handle this edge case (hence 'mostly').
2019-04-19 11:57:29 -07:00
Alex Maystrenko
f702bc0797 rebuild when VCPKGRS_DYNAMIC changes 2019-03-24 21:21:13 +01:00
Will Davis
9f009fe1e0 Use pkg-config to generate sqlite link dependencies
When built as a static library, sqlite (or sqlcipher) doesn't carry
additional link dependencies with it, and the libsqlite3-sys rlib
doesn't pick them up either. A dependent crate attempting to link
against rusqlite then has to specify these additional link commands,
and even then they need to be specified before the libsqlite3-sys
rlib is specified on the command line.

Fix this by attempting to use pkg-config when the
(SQLITE3|SQLCIPHER)_LIB_DIR is specified, since these builds produce
the pkg-config link dependency information, and the pkg_config crate
can automatically generate the correct link commands using that.

(Additionally, since (SQLITE3|SQLCIPHER)_STATIC is already defined,
or not, the --static flag will be correctly configured for pkg_config)
2019-02-04 22:53:57 -06:00
gwenn
dbc4eef657
Session extension (#459)
Session extension bindings
2019-01-13 12:46:19 +01:00
gwenn
6d668d798a Restore old bindgen for Diesel 2019-01-06 09:50:35 +01:00
Thom Chiovoloni
4fd00a6311 Add support for forcing cargo:rustc-link-lib to link as native 2018-12-14 17:12:31 -08:00
gwenn
d874180333 Rust 2018 idioms 2018-12-07 21:57:04 +01:00
gwenn
e5b1af51ab Allow build time bindgen of bundled SQLite
Rewrite https://github.com/jgallagher/rusqlite/pull/320
2018-10-28 18:16:48 +01:00
gwenn
9db7b2e7af Remove old bindgens
Keep the oldest/default one (3.6.8).
But remove intermediate versions: 3.6.11, 3.7.3, 3.7.4, 3.7.16.
2018-09-04 18:58:17 +02:00
gwenn
0ccf98d214 Merge remote-tracking branch 'jgallagher/master' into vtab 2018-08-11 13:37:56 +02:00
gwenn
c925d1aa97 Rustfmt 2018-08-11 12:48:21 +02:00
gwenn
fc37b324b8 Merge remote-tracking branch 'jgallagher/master' into vtab 2018-07-28 16:56:21 +02:00
Tom
028d8945a3 Exporting the built library's directory, for linking 2018-06-29 23:20:59 +01:00
gwenn
e1ba89c310 Merge remote-tracking branch 'jgallagher/master' into vtab 2018-06-10 18:49:40 +02:00
gwenn
1f0437c084
Merge pull request #344 from gwenn/rerun-if-env-changed
Use `rerun-if-env-changed` in libsqlite3-sys
2018-05-12 19:16:50 +02:00
gwenn
1e3dc542a4 Merge remote-tracking branch 'jgallagher/master' into vtab 2018-05-06 08:00:12 +02:00
gwenn
9c5c9e3c7e Merge remote-tracking branch 'jgallagher/master' into vtab 2018-04-30 22:02:14 +02:00
gwenn
9178e3f452 Use rerun-if-env-changed in libsqlite3-sys
Fix #329
2018-04-06 22:27:07 +02:00
gwenn
5d91fb088f Unlock notification 2018-03-24 08:03:21 +01:00
gwenn
08cda05406 Update to latest version of SQLite3 3.22.0 #326
Upgrade to bindgen 0.32
Add a shell script to upgrade bundled SQLite version
Upgrade bundle SQLite to 3.22.0
Upgrade libsqlite3-sys version to 0.9.2
2018-02-10 11:04:02 +01:00
gwenn
3aaab1e36f Merge remote-tracking branch 'remotes/jgallagher/master' into vtab 2018-01-20 12:29:07 +01:00
John Gallagher
00e90eaafe
Merge pull request #308 from jgallagher/lvillani-sqlcipher
Add support for linking to SQLCipher
2017-11-13 15:47:11 -07:00
John Gallagher
cbdbacddd8 Merge branch 'sqlcipher' of https://github.com/lvillani/rusqlite into lvillani-sqlcipher 2017-11-13 13:29:24 -07:00
John Gallagher
dc6268d4c9 Merge branch 'update-bindgen-dep' of https://github.com/fitzgen/rusqlite into fitzgen-update-bindgen-dep 2017-11-13 13:26:50 -07:00
Nick Fitzgerald
ea7207b83d Update bindgen dependency to the latest version
This also required adjusting the fixup inserting `SQLITE_DETERMINISTIC` into the
bindings if it was missing. Now that `bindgen` uses the `quote` crate for code
generation, instead of `syntex`, we can't rely on the output being formatted (it
only is formatted if there is a usable `rustfmt` on the `$PATH`). Even better
than this `contains` tweak would be switching to regexps or something.

Despite that formatting hiccup, newer `bindgen` releases are more reliable due
to many bug fixes, and also build in approximately half the time that older
`bindgen` versions do.
2017-11-11 17:09:19 -08:00
Lorenzo Villani
8cbfc00ec6 Add support for linking to SQLCipher 2017-10-24 19:52:19 +02:00
Ossi Herrala
28d58529b7 Update dependencies
* Gcc crate has been renamed to cc.
* Chrono::UTC has been renamed to Chrono::Utc.
* bitflags 1.0 uses associated constants. So prefix OpenFlags.
2017-10-09 23:25:40 +03:00
gwenn
c842e789bd Merge remote-tracking branch 'jgallagher/master' into vtab 2017-09-11 19:45:22 +02:00
John Gallagher
b1927b31bf Merge pull request #278 from mcgoo/vcpkg
for msvc abi builds, add support for using sqlite from a vcpkg installation if available
2017-05-29 10:23:08 -04:00
John Gallagher
b7ce75b463 Merge pull request #264 from gwenn/outdated
Upgrade outdated dependencies
2017-05-29 10:11:09 -04:00
Jim McGrath
b3faed0f75 only depend on vcpkg for cfg(target_env = "msvc") 2017-05-28 06:15:47 -05:00
Jim McGrath
0dd10f85ba for msvc abi builds, add support for using sqlite from a vcpkg installation if available 2017-05-27 22:35:46 -05:00
gwenn
e8bc9fcc21 TypeChooser has been renamed to ParseCallbacks 2017-04-27 18:42:10 +02:00
gwenn
1d684ae653 Merge remote-tracking branch 'jgallagher/master' into vtab 2017-04-21 20:01:04 +02:00