Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
234 lines (224 loc) · 11 KB
/
Copy pathCargo.toml
File metadata and controls
234 lines (224 loc) · 11 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
[workspace]
members = [
"crates/sqlbuild-build-features",
"crates/sqlbuild-core",
"crates/sqlbuild-cursor",
"crates/sqlbuild-process-ownership",
"crates/sqlbuild-state",
"crates/sqlbuild-pysource",
"crates/sqlbuild-cache",
"crates/sqlbuild-sqltext",
"crates/sqlbuild-config",
"crates/sqlbuild-host",
"crates/sqlbuild-recall",
"crates/sqlbuild-orchestration",
"crates/sqlbuild-discovery",
"crates/sqlbuild-scopes",
"crates/sqlbuild-model-config",
"crates/sqlbuild-render",
"crates/sqlbuild-attachments",
"crates/sqlbuild-analysis",
"crates/sqlbuild-rules",
"crates/sqlbuild-refactor",
"crates/sqlbuild-project",
"crates/sqlbuild-cli",
"crates/sqlbuild-python",
]
resolver = "2"
# Native crates from the bottom up: each crate may depend only on crates listed before it.
# `make check-ci` enforces this, keeps PyO3 in the Python boundary crate and keeps polyglot
# out of every crate below the polyglot floor. See crates/README.md.
[workspace.metadata.native-layers]
order = [
"sqlbuild-build-features",
"sqlbuild-core",
"sqlbuild-cursor",
"sqlbuild-process-ownership",
"sqlbuild-state",
"sqlbuild-pysource",
"sqlbuild-cache",
"sqlbuild-sqltext",
"sqlbuild-config",
"sqlbuild-host",
"sqlbuild-recall",
"sqlbuild-model-config",
"sqlbuild-orchestration",
"sqlbuild-discovery",
"sqlbuild-render",
"sqlbuild-scopes",
"sqlbuild-attachments",
"sqlbuild-analysis",
"sqlbuild-rules",
"sqlbuild-refactor",
"sqlbuild-project",
"sqlbuild-cli",
"sqlbuild-python",
]
python-boundary = "sqlbuild-python"
polyglot-floor = "sqlbuild-analysis"
[workspace.package]
# Fixed on purpose: a crate's version is part of its Cargo build identity, so a shared release
# version would recompile every crate after each release. The release version lives in the
# sqlbuild-cli and sqlbuild-python manifests; see crates/README.md.
version = "0.0.0"
edition = "2024"
license = "Apache-2.0"
publish = false
rust-version = "1.88"
[workspace.dependencies]
argon2 = "0.5.3"
axum = { version = "0.8", default-features = false, features = ["http1", "json", "query", "tokio"] }
axum-server = { version = "0.8", default-features = false, features = ["tls-rustls-no-provider"] }
# Compresses the server's larger JSON reads and UI assets for browsers.
tower-http = { version = "0.6", default-features = false, features = ["compression-gzip"] }
fensu-policy = "=0.22.0"
futures-util = { version = "0.3", default-features = false, features = ["std"] }
# `sqb` names compute log captures with random ids, as `uuid.uuid4().hex`.
getrandom = "0.4"
globset = "0.4"
# Windows only: tells NTFS junctions, which Python walks as directories, from symbolic links.
junction = { version = "2.1.0", default-features = false }
keyring = { version = "3.6.3", default-features = false }
# Python loads the extension with dlopen, so mimalloc must not use initial-exec TLS.
# no_thp: mimalloc otherwise asks for transparent huge pages on its 1 GiB arenas, and each
# partly used 2 MiB page then stays resident in full, which raises peak memory.
mimalloc = { version = "0.1", default-features = false, features = ["local_dynamic_tls", "no_thp"] }
proc-macro2 = { version = "1", features = ["span-locations"] }
pyo3 = { version = "0.26", features = ["abi3-py312"] }
rpassword = "7.5.4"
rcgen = "0.14"
polyglot-sql = { git = "https://github.com/sqlstack-io/polyglot.git", rev = "8767d688c5b504ad609645e27ab77a260d91c5a1", default-features = false, features = [
"ast-tools",
"builder",
"all-dialects",
"semantic",
"stacker",
] }
blake3 = { version = "1", features = ["rayon"] }
# Only sqlbuild-build-features uses these: each enables in the sqb build exactly the features the
# extension build resolves for that crate, so both builds share one compile of every common crate.
arrayvec = "0.7"
bstr = "1"
either = { version = "1", default-features = false, features = ["use_std"] }
memchr = "2"
once_cell = "1"
openidconnect = { version = "4.1", default-features = false, features = ["reqwest", "rustls-tls"] }
regex-automata = { version = "0.4", default-features = false, features = ["dfa-search"] }
syn-v2-macro-features = { package = "syn", version = "2", default-features = false, features = ["extra-traits", "fold", "visit-mut"] }
syn-v3-macro-features = { package = "syn", version = "3", default-features = false, features = ["extra-traits", "full"] }
thiserror = "2"
# Windows only: `sqb` ignores Ctrl+C while the Python CLI it started handles it.
ctrlc = "3"
command-fds = "0.3"
libc = "0.2"
quote = "1"
rayon = "1"
# Static reading of project Python source; the parser fensu uses.
ruff_python_ast = "=0.0.4"
ruff_python_parser = "=0.0.4"
ruff_text_size = "=0.0.4"
# Unix only: `sqb` shares the compute log prune lock with Python's `filelock` through `flock`.
# Fast deterministic hasher for hot in-memory maps whose iteration order never reaches output.
rustc-hash = "2"
# The native SIGTERM handler: sets a flag the CLI watches, without unsafe code. The only crate
# allowed unsafe code is sqlbuild-process-ownership, for the platform calls that prove which
# process owns a worker claim; every other crate forbids it.
signal-hook = { version = "0.3", default-features = false }
# Features signal-hook's registry enables, matched in the sqb build through sqlbuild-build-features.
errno = "0.3"
windows-sys = { version = "0.61", default-features = false, features = ["Win32_System_Diagnostics_Debug"] }
# Recall's local store: SQLite compiled in, so every build has the same engine version.
rusqlite = { version = "0.37", features = ["bundled", "column_decltype"] }
rustix = { version = "1.1.4", default-features = false, features = ["fs", "process", "std", "termios"] }
saphyr-parser = "0.1"
regex = "1"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1", features = ["derive"] }
# Every crate relies on insertion-ordered JSON objects, which the extension has always built with.
serde_json = { version = "1", features = ["preserve_order"] }
sha2 = "0.10"
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10"
croner = "=3.0.1"
flate2 = "1"
proptest = "1"
same-file = "1"
semver = "1"
# Pin SQLx's driver crates together: its umbrella also resolves an incompatible SQLite engine.
sqlx-core = { version = "=0.8.6", default-features = false, features = ["_rt-tokio", "_tls-rustls-ring-webpki", "chrono", "uuid", "json"] }
sqlx-postgres = { version = "=0.8.6", default-features = false, features = ["chrono", "uuid", "json"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time", "signal", "process", "net"] }
uuid = { version = "=1.18.1", features = ["v5", "v7", "serde"] }
utoipa = { version = "5", features = ["chrono", "uuid"] }
sqlbuild-analysis = { path = "crates/sqlbuild-analysis" }
sqlbuild-attachments = { path = "crates/sqlbuild-attachments" }
sqlbuild-build-features = { path = "crates/sqlbuild-build-features" }
sqlbuild-cache = { path = "crates/sqlbuild-cache" }
sqlbuild-cli = { path = "crates/sqlbuild-cli" }
sqlbuild-config = { path = "crates/sqlbuild-config" }
sqlbuild-core = { path = "crates/sqlbuild-core" }
sqlbuild-cursor = { path = "crates/sqlbuild-cursor" }
sqlbuild-discovery = { path = "crates/sqlbuild-discovery" }
sqlbuild-host = { path = "crates/sqlbuild-host" }
sqlbuild-render = { path = "crates/sqlbuild-render" }
sqlbuild-refactor = { path = "crates/sqlbuild-refactor" }
sqlbuild-rules = { path = "crates/sqlbuild-rules" }
sqlbuild-model-config = { path = "crates/sqlbuild-model-config" }
sqlbuild-orchestration = { path = "crates/sqlbuild-orchestration" }
sqlbuild-process-ownership = { path = "crates/sqlbuild-process-ownership" }
sqlbuild-project = { path = "crates/sqlbuild-project" }
sqlbuild-pysource = { path = "crates/sqlbuild-pysource" }
sqlbuild-recall = { path = "crates/sqlbuild-recall" }
sqlbuild-scopes = { path = "crates/sqlbuild-scopes" }
sqlbuild-sqltext = { path = "crates/sqlbuild-sqltext" }
sqlbuild-state = { path = "crates/sqlbuild-state" }
# SQL lint Rules, quality Rules and the formatter.
sqlclean = { git = "https://github.com/sqlstack-io/sqlclean.git", rev = "6e18af661ce3a6bcc385a38954c86696d722f400" }
# SQL change fingerprints over SQLQuack's tokenizers.
sqlquack-fingerprint = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
# Scopes, name resolution, types and lineage for the native analysis route.
sqlquack-semantics = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a", features = ["bigquery", "clickhouse", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
# SQLQuack's Snowflake-family parser and tokenizer, reached as SQLQuack exposes them.
sqlquack-parse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
# SQLQuack's syntax tree and lossless tokens.
sqlquack-syntax = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-bigquery = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-clickhouse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-databricks = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-duckdb = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-postgres = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-sqlite = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
sqlquack-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "8d28aa4c4b6c3d8c5345ddef3d620fa24e26741a" }
stacker = "0.1"
syn = { version = "2", features = ["full", "visit", "extra-traits"] }
subtle = "2"
tempfile = "3"
toml = "0.9"
toml_edit = { version = "0.25", default-features = false, features = ["parse"] }
toml_parser = "1"
walkdir = "2"
[workspace.lints.rust]
unsafe_code = "forbid"
unreachable_pub = "deny"
unused_must_use = "deny"
[workspace.lints.clippy]
await_holding_lock = "deny"
[profile.dev]
debug = "line-tables-only"
[profile.dev.package."*"]
opt-level = 1
debug = false
[profile.release]
strip = "symbols"
# Released wheels: one codegen unit per crate keeps one copy of generic code that parallel units
# each instantiate, so the native binaries are about an eighth smaller and build in about 2x time.
[profile.dist]
inherits = "release"
codegen-units = 1
# Local iteration: release-level optimisation with incremental builds, so rebuilding after a
# focused change does not recompile the whole binding crate. CI uses `release`.
[profile.fast]
inherits = "release"
incremental = true
codegen-units = 256
strip = "none"