Add a feature flag to control the use of rusqlite's bundled SQLite. r=emily

You can use this in conjunction with setting SQLITE3_LIB_DIR to control which SQLite is used.

See https://github.com/jgallagher/rusqlite for more.

Also add recent contributors to the authors array.
This commit is contained in:
Richard Newman 2018-02-13 08:25:58 -08:00
parent 84f29676e8
commit 2ac7a1b1de
7 changed files with 26 additions and 12 deletions

View file

@ -6,11 +6,19 @@ authors = [
"Jordan Santell <jsantell@mozilla.com>",
"Joe Walker <jwalker@mozilla.com>",
"Emily Toop <etoop@mozilla.com>",
"Grisha Kruglov <grigory@kruglov.ca>",
"Kit Cambridge <kit@yakshaving.ninja>",
"Edouard Oger <eoger@fastmail.com>",
"Thom Chiovoloni <tchiovoloni@mozilla.com>",
]
name = "mentat"
version = "0.6.0"
version = "0.6.1"
build = "build/version.rs"
[features]
default = ["bundled_sqlite3"]
bundled_sqlite3 = ["rusqlite/bundled"]
[workspace]
members = ["tools/cli"]
@ -26,7 +34,7 @@ time = "0.1"
[dependencies.rusqlite]
version = "0.12"
# System sqlite might be very old.
features = ["bundled", "limits"]
features = ["limits"]
[dependencies.edn]
path = "edn"

View file

@ -145,3 +145,14 @@ Project Mentat is currently licensed under the Apache License v2.0. See the `LIC
Mentat uses partial indices, which are available in SQLite 3.8.0 and higher.
It also uses FTS4, which is [a compile time option](http://www.sqlite.org/fts3.html#section_2).
By default, Mentat specifies the `"bundled"` feature for `rusqlite`, which uses a relatively recent
version of SQLite. If you want to link against the system version of SQLite, omit `"bundled_sqlite3"`
from Mentat's features.
```toml
[dependencies.mentat]
version = "0.6"
# System sqlite is known to be new.
default-features = false
```

View file

@ -12,8 +12,7 @@ time = "0.1"
[dependencies.rusqlite]
version = "0.12"
# System sqlite might be very old.
features = ["bundled", "limits"]
features = ["limits"]
[dependencies.edn]
path = "../edn"

View file

@ -8,8 +8,7 @@ error-chain = { git = "https://github.com/rnewman/error-chain", branch = "rnewma
[dependencies.rusqlite]
version = "0.12"
# System sqlite might be very old.
features = ["bundled", "limits"]
features = ["limits"]
[dependencies.mentat_core]
path = "../core"

View file

@ -9,8 +9,7 @@ ordered-float = "0.5"
[dependencies.rusqlite]
version = "0.12"
# System sqlite might be very old.
features = ["bundled", "limits"]
features = ["limits"]
[dependencies.mentat_core]
path = "../core"

View file

@ -25,5 +25,4 @@ path = "../db"
[dependencies.rusqlite]
version = "0.12"
# System sqlite might be very old.
features = ["bundled", "limits"]
features = ["limits"]

View file

@ -24,8 +24,7 @@ error-chain = { git = "https://github.com/rnewman/error-chain", branch = "rnewma
[dependencies.rusqlite]
version = "0.12"
# System sqlite might be very old.
features = ["bundled", "limits"]
features = ["limits"]
[dependencies.mentat]
path = "../.."