-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
79 lines (69 loc) · 2.59 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[package]
name = "sqlite-compressions"
version = "0.2.18" # This value is also used in the README.md
description = "Compression, decompression, testing, diffing and patching functions for SQLite: gzip, brotli, bsdiff, ..."
authors = ["Yuri Astrakhan <[email protected]>"]
repository = "https://github.com/nyurik/sqlite-compressions"
edition = "2021"
license = "MIT OR Apache-2.0"
keywords = ["sqlite", "compression", "gzip", "brotli", "bsdiff"]
categories = ["database", "compression"]
rust-version = "1.77.2"
[lib]
name = "sqlite_compressions"
# Loadable extenios is a cdylib (lib), but Rust does not allow multiple libs per crate, so using an example instead.
# See https://github.com/rust-lang/cargo/issues/8628
[[example]]
name = "sqlite_compressions"
path = "src/cdylib/cdylib.rs"
crate-type = ["cdylib"]
required-features = ["loadable_extension"]
[features]
default = ["trace", "brotli", "bsdiff4", "bsdiffraw", "bzip2", "gzip"]
# Use this feature to build loadable extension.
# Assumes --no-default-features.
default_loadable_extension = ["loadable_extension", "brotli", "bsdiff4", "bsdiffraw", "bzip2", "gzip"]
#
# Enable Trace Logging
trace = ["dep:log"]
#
# Build loadable extension. Not compatible with the window feature.
# See https://github.com/rusqlite/rusqlite/discussions/1423
loadable_extension = ["rusqlite/loadable_extension", "rusqlite/trace"]
#
# Encoding algorithms
brotli = ["dep:brotli"]
bsdiff4 = ["dep:qbsdiff"]
bsdiffraw = ["dep:bsdiff"]
bzip2 = ["dep:bzip2"]
gzip = ["dep:flate2"]
[dependencies]
brotli = { version = ">=5.0, <8.0", optional = true }
bsdiff = { version = "0.2.0", optional = true }
bzip2 = { version = "0.5.0", optional = true }
flate2 = { version = "1", optional = true }
log = { version = "0.4.22", optional = true }
qbsdiff = { version = "1.4.2", optional = true }
# There are multiple versions that could work, but sqlx requires a specific one, so don't limit it here
# Note that cdylib requires >= 0.32 (controlled by the lock file)
rusqlite = { version = ">=0.30", features = ["functions"] }
[dev-dependencies]
cargo-husky = { version = "1", features = ["user-hooks"], default-features = false }
criterion = { version = "0.5", features = ["html_reports"] }
ctor = "0.2"
env_logger = "0.11"
hex = "0.4"
insta = { version = "1", features = [] }
rstest = "0.23"
[lints.rust]
unused_qualifications = "warn"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
missing_errors_doc = "allow"
module_name_repetitions = "allow"
[[bench]]
name = "bench"
harness = false
#[patch.crates-io]
#rusqlite = { path = "../rusqlite" }
#libsqlite3-sys = { path = "../rusqlite/libsqlite3-sys" }