[package]
name = "sqlitegis"
version = "0.1.0"
edition = "2021"
rust-version.workspace = true
authors = ["Luca Cappelletti"]
license = "MIT OR Apache-2.0"
description = "SQLiteGIS: PostGIS-style spatial functions for SQLite in pure Rust."
readme = "README.md"
repository = "https://github.com/LucaCappelletti94/sqlitegis"
homepage = "https://github.com/LucaCappelletti94/sqlitegis"
documentation = "https://docs.rs/sqlitegis"
keywords = ["geospatial", "sqlite", "postgis", "diesel", "ewkb"]
categories = ["database", "api-bindings", "algorithms", "science"]
autotests = false
[package.metadata.docs.rs]
features = ["sqlite", "sqlite-extension", "diesel-sqlite", "diesel-postgres"]
rustdoc-args = ["--cfg", "docsrs"]
[lib]
name = "sqlitegis"
crate-type = ["lib", "cdylib"]
[features]
default = ["diesel-sqlite"]
sqlite = ["dep:libsqlite3-sys", "dep:sqlite-wasm-rs"]
sqlite-extension = ["sqlite"]
diesel = ["dep:diesel"]
diesel-sqlite = ["diesel", "sqlite", "diesel/sqlite"]
diesel-postgres = ["diesel", "diesel/postgres"]
bundled-sqlite = ["libsqlite3-sys?/bundled"]
[dependencies]
geo = { workspace = true }
geozero = { version = "0.15", features = ["with-wkt", "with-geojson", "with-svg", "with-geo", "with-wkb"] }
thiserror = "2"
serde_json = "1"
diesel = { version = "2", default-features = false, optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
libsqlite3-sys = { workspace = true, features = ["bundled_bindings"], optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
sqlite-wasm-rs = { version = "0.5", optional = true }
[dev-dependencies]
chrono = "0.4"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = { version = "0.8.2", default-features = false, features = ["plotters", "cargo_bench_support"] }
libsqlite3-sys = { workspace = true, features = ["bundled_bindings"] }
testcontainers-modules = { version = "0.15", features = ["postgres"] }
tokio = { version = "1", features = ["rt", "macros"] }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
sqlite-wasm-rs = "0.5"
wasm-bindgen-test = "0.3"
[[test]]
name = "sqlite_integration"
path = "tests/sqlite_integration.rs"
required-features = ["sqlite"]
[[test]]
name = "sqlite_wasm"
path = "tests/sqlite_wasm.rs"
required-features = ["sqlite"]
[[test]]
name = "diesel_sqlite_types"
path = "tests/diesel_sqlite_types.rs"
required-features = ["diesel-sqlite"]
[[test]]
name = "diesel_expression_methods"
path = "tests/diesel_expression_methods.rs"
required-features = ["diesel-sqlite"]
[[test]]
name = "diesel_sqlite_integration"
path = "tests/diesel_sqlite_integration.rs"
required-features = ["diesel-sqlite"]
[[test]]
name = "diesel_wasm_integration"
path = "tests/diesel_wasm_integration.rs"
required-features = ["diesel-sqlite"]
[[test]]
name = "diesel_postgres_integration"
path = "tests/diesel_postgres_integration.rs"
required-features = ["diesel-postgres"]
[[bench]]
name = "spatial_index"
path = "benches/spatial_index.rs"
harness = false
required-features = ["diesel-sqlite"]
[workspace]
resolver = "2"
[workspace.package]
rust-version = "1.88"
[workspace.dependencies]
geo = { version = "0.33", default-features = false }
libsqlite3-sys = { version = ">=0.17.2, <0.38.0" }
[profile.release]
opt-level = "z"
lto = true
strip = true