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
[]
= "graphitesql"
= "0.1.7"
= "2024"
= "1.89"
= "A pure, safe, no_std Rust re-implementation of SQLite, compatible with the SQLite 3 file format."
# Public domain, with the SQLite "blessing" in place of a legal notice.
# "blessing" is the SPDX identifier for the SQLite Blessing. See LICENSE.
= "blessing"
= "https://github.com/KarpelesLab/graphitesql"
= "README.md"
= ["sqlite", "database", "sql", "no_std", "wasm"]
= ["database-implementations", "no-std", "wasm"]
# Keep the published crate small: the reference/ tree is dev-only and git-ignored.
= ["/reference", "/.github"]
[[]]
= "graphitesql"
= "src/bin/graphitesql.rs"
= ["std"]
# NOTE: the `[lib]` crate-type is left at the default (`rlib`), so the default and
# `no_std` builds stay pure Rust libraries. The `libsqlite3`-style shared/static
# library and the WebAssembly module are produced ON DEMAND by overriding the
# crate-type at build time (same pattern as the purecrypto FFI shim), e.g.:
# cargo rustc --release --features capi --crate-type cdylib # libgraphitesql.so
# cargo rustc --release --features capi --crate-type staticlib # libgraphitesql.a
# cargo rustc --release --features wasm --target wasm32-unknown-unknown --crate-type cdylib
# This keeps `cargo build --no-default-features` (a bare no_std rlib) working — a
# no_std cdylib/staticlib would otherwise need a global allocator + panic handler.
[]
# `std` is on by default and brings the std-backed VFS (real files) plus
# std::error::Error impls. Turn it off for no_std targets (wasm, embedded);
# graphitesql then runs entirely in-memory unless you supply your own Vfs.
= ["std", "fts5"]
= []
# `fts5` registers the built-in FTS5 full-text-search virtual table (the
# `MATCH` query language, `bm25()`/`rank` ranking, and `highlight()`). On by
# default; disable it to drop full-text search and shrink the build.
= []
# `unicode` switches the case-folding functions (`upper()` / `lower()`) from
# stock sqlite3's ASCII-only fold to full Unicode case-folding (`café` → `CAFÉ`),
# like a sqlite3 built with the ICU extension. Off by default so the default
# build stays behavior-identical to stock sqlite3; turn it on for Unicode text.
= []
# `capi` exports a `libsqlite3`-compatible C ABI (`extern "C"` `sqlite3_*`) from
# the cdylib/staticlib. Needs the std VFS (file databases), so it pulls in `std`.
# Off by default (the engine has no FFI without it); uses `unsafe` (raw pointers).
= ["std"]
# `wasm` builds the WebAssembly (browser) bindings (`wasm-bindgen` + an OPFS VFS).
# Off by default; uses `unsafe` (wasm-bindgen glue) and the js-sys/web-sys deps.
= ["dep:wasm-bindgen", "dep:js-sys", "dep:web-sys"]
[]
# The default build is zero-dependency (pure `core` + `alloc`). These are OPT-IN,
# pulled only by the `wasm` feature for the browser bindings.
= { = "0.2", = true }
= { = "0.3", = true }
= { = "0.3", = true, = [
"FileSystemSyncAccessHandle",
"FileSystemReadWriteOptions",
] }
[]
= 3
= true
= "abort"
[]
# The engine is `unsafe`-free. `deny` (not `forbid`) so the opt-in `capi`/`wasm`
# FFI modules can carry a localized `#[allow(unsafe_code)]`; nothing else may.
= "deny"
= "warn"