-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathCargo.toml
More file actions
768 lines (736 loc) · 30.8 KB
/
Copy pathCargo.toml
File metadata and controls
768 lines (736 loc) · 30.8 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
[package]
name = "qsv"
version = "22.0.1" #:version
authors = ["Joel Natividad <joel@datHere.com>"]
description = "A Blazing-Fast Data-wrangling toolkit."
documentation = "https://github.com/dathere/qsv#qsv-ultra-fast-csv-data-wrangling-toolkit"
homepage = "https://qsv.dathere.com"
repository = "https://github.com/dathere/qsv"
readme = "README.md"
keywords = ["csv", "geocode", "data-engineering", "etl", "opendata"]
categories = ["command-line-utilities", "parser-implementations"]
license = "MIT"
autotests = false
edition = "2024"
rust-version = "1.97"
resolver = "3"
autobins = false
include = [
"src/**/*",
"LICENSE-MIT",
"COPYING",
# Third-party attribution. THIRD_PARTY_NOTICES.md is the inventory; the
# vendored MIT-licensed assets must ship with their copyright notices, as
# their licenses require. (src/cmd/assets/LICENSE-DataTables.txt is already
# covered by "src/**/*" above, but luadate's is not — date.lua was being
# packaged without its notice.)
"THIRD_PARTY_NOTICES.md",
"resources/luau/vendor/luadate/LICENSE.txt",
"resources/luau/vendor/README.md",
"README.md",
"CHANGELOG.md",
"resources/luau/vendor/luadate/date.lua",
"resources/describegpt_defaults.toml",
# Profile engine resources — bundled via include_str! in
# src/cmd/profile/profile_spec.rs::EMBEDDED and
# src/cmd/profile/external_validate.rs::EMBEDDED_RESOURCES. These
# patterns only affect the `cargo package`/`cargo publish` tarball;
# they have no effect on builds from a git checkout (CI, local dev,
# the binary-release workflows), where the files are always present
# on disk. They're kept so the tarball stays complete (the
# include_str! resources must ship with it) in case we run
# `cargo package` or resume crates.io publishing. NOTE: we do not
# currently support `cargo install qsv` — [patch.crates-io] forks
# are stripped on publish, yielding an untested dependency tree —
# so the crates.io build path is not exercised today. The geoconnex
# paths are tracked here unconditionally — feature gating happens at
# the Rust level, not at packaging time, and the ~10KB of
# geoconnex/SHACL Turtle plus the small YAML is harmless to anyone
# who doesn't compile the feature.
"resources/profiles/*.yaml",
"resources/profiles/README.md",
"resources/dcat-us-v3/**/*",
"resources/dcat-ap-v3/shacl/*",
"resources/geoconnex/shacl/*",
]
[[bin]]
name = "qsv"
test = true
bench = false
doctest = false
path = "src/main.rs"
required-features = ["feature_capable"]
[[bin]]
name = "qsvmcp"
test = true
bench = false
doctest = false
path = "src/main.rs"
required-features = ["qsvmcp"]
[[bin]]
name = "qsvlite"
test = true
bench = false
doctest = false
path = "src/mainlite.rs"
required-features = ["lite"]
[[bin]]
name = "qsvdp"
test = true
bench = false
doctest = false
path = "src/maindp.rs"
required-features = ["datapusher_plus"]
[[test]]
name = "tests"
path = "tests/tests.rs"
[lints.clippy]
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
# things are often more readable this way
needless_raw_string_hashes = "allow"
cast_lossless = "allow"
module_name_repetitions = "allow"
type_complexity = "allow"
zero_prefixed_literal = "allow"
# correctly used
enum_glob_use = "allow"
result_unit_err = "allow"
# not practical
similar_names = "allow"
too_many_lines = "allow"
struct_excessive_bools = "allow"
# preference
unnecessary_wraps = "allow"
# false positive
needless_doctest_main = "allow"
# noisy
missing_errors_doc = "allow"
use_self = "allow"
cognitive_complexity = "allow"
option_if_let_else = "allow"
implicit_clone = "allow"
# pub(crate) documents crate-internal intent; equivalent to pub only because the module is private
redundant_pub_crate = "allow"
# warned
missing_asserts_for_indexing = "warn"
# code identifiers in doc comments should be backticked.
# prose-y proper nouns are exempted via doc-valid-idents in clippy.toml
doc_markdown = "warn"
[profile.release]
codegen-units = 1
debug = false
lto = true
opt-level = 3
panic = "abort"
strip = true
# luau (mlua) requires the unwind panic strategy: when a Luau callback raises an
# error (e.g. qsv_cumsum overflow, an invalid qsv_shellcmd), mlua propagates it
# across the Lua/C boundary via a Rust unwind. With panic = "abort" that unwind
# hits a non-unwinding context and aborts the process instead of surfacing the
# error (see https://github.com/dathere/qsv/issues/3937). luau is only enabled
# in the main `qsv` binary (all_features / distrib_features), so that binary
# MUST be built with this profile. The other binaries (qsvlite, qsvdp, qsvmcp)
# do NOT enable luau and keep panic = "abort" via [profile.release].
[profile.release-luau]
inherits = "release"
panic = "unwind"
[profile.release-samply]
inherits = "release"
debug = true
panic = "unwind"
strip = false
[dependencies]
anstream = { version = "1.0", optional = true }
arboard = { version = "3.6.1", default-features = false, optional = true }
atoi_simd = "0.18"
base62 = { version = "2.2", optional = true }
base64-simd = { version = "0.8", optional = true }
bitvec = "1"
blake3 = { version = "1.8", features = ["rayon", "mmap"] }
bytemuck = { version = "1.24", features = [
"latest_stable_rust",
], optional = true }
byteorder = "1.5"
bytes = "1"
cached = { version = "=3.0.0-rc.10", features = [
"ahash",
"redb_store",
"redis_store",
] }
calamine = { version = "0.36", features = ["chrono"] }
censor = { version = "0.3", optional = true }
chrono = { version = "0.4", default-features = false }
chrono-tz = "0.10"
console = { version = "0.16", optional = true }
const_format = "0.2"
cpc = { version = "5", optional = true }
crc32fast = { version = "1.4", optional = true }
crossbeam-channel = "0.5"
crossterm = { version = "0.29", optional = true }
csv = "1.4"
csv-diff = "0.1"
csv-index = "0.1"
csv-nose = { version = "1", default-features = false, features = [
"runtime-dispatch-simd",
] }
csvlens = { version = "0.15", optional = true, default-features = false, features = [
"clipboard",
] }
csvs_convert = { version = "0.13", default-features = false, features = [
"converters",
], optional = true }
dns-lookup = { version = "3", optional = true }
directories = "6.0"
dotenvy = "0.15"
dunce = "1"
dynfmt2 = { version = "0.4", default-features = false, features = ["curly"] }
eudex = { version = "0.1", optional = true }
ext-sort = { version = "0.1", default-features = false }
fake = { version = "5", features = [
"derive",
"chrono",
"time",
"uuid",
"random_color",
], optional = true }
fast-float2 = "0.2"
flate2 = { version = "1", optional = true }
# same inode/file-id check for `denull --apply`; already in the tree via walkdir
same-file = { version = "1.0.6", optional = true }
foldhash = "0.2"
glob = { version = "0.3", optional = true }
file-format = { version = "0.29", features = ["reader"] }
filetime = "0.2"
flexi_logger = { version = "0.31", features = [
"async",
"compress",
"dont_minimize_extra_stacks",
], default-features = false }
futures = "0.3"
futures-util = "0.3"
gender_guesser = { version = "0.2", optional = true }
geojson = { version = "1", default-features = false, optional = true }
geosuggest-core = { version = "0.8", features = ["geoip2"], optional = true }
geosuggest-utils = { version = "0.8", optional = true }
geozero = { version = "0.15", features = [
"with-csv",
"with-shp",
], optional = true }
governor = { version = "0.10", optional = true }
grex = { version = "1.4", default-features = false }
gzp = { version = "2", default-features = false, features = ["snappy_default"] }
hostname-validator = "1.1"
human-panic = "2"
iana-time-zone = "0.1"
indexmap = { version = "2.14", features = ["serde"] }
indicatif = "0.18"
# already in the tree as a transitive dependency of qsv_currency; taken directly so describegpt
# can validate an ISO-4217 alpha-3 code (`Currency::from_code`) and viz can render its symbol.
iso_currency = "0.5"
itertools = "0.15"
itoa = "1"
jaq-core = "3"
jaq-json = { version = "2", features = ["serde"] }
jaq-std = "3"
jsonschema = { version = "0.49", features = [
"resolve-file",
"resolve-http",
"tls-aws-lc-rs",
], default-features = false }
libc = "0.2"
log = "0.4"
magika = { version = "1.1", optional = true }
memmap2 = "0.9"
mimalloc = { version = "0.1", default-features = false, features = ["extended"], optional = true }
minijinja = { version = "2.23", features = [
"json",
"loop_controls",
"speedups",
"stacker",
"urlencode",
] }
minijinja-contrib = { version = "2.23", features = [
"datetime",
"pycompat",
"rand",
"timezone",
"unicode_wordwrap",
"wordcount",
"wordwrap",
] }
mlua = { version = "0.12", features = [
"luau",
"luau-jit",
"serialize",
], optional = true }
num_cpus = "1"
# object_store backs the `get_cloud` sub-feature (s3://, gs://, az:// sources for
# `qsv get`). default-features=false; only the cloud providers are enabled. Already
# compiled transitively via polars in distrib/qsvmcp/datapusher_plus builds, so the
# marginal cost there is ~zero. See `qsv get --help`.
object_store = { version = "0.13", default-features = false, features = [
"aws",
"azure",
"gcp",
], optional = true }
odht = "0.3"
# opener: open the generated chart/Data Schematic in the OS default app (browser for
# HTML, image viewer for PNG/SVG/...) for `qsv viz --open`. See the `viz` feature.
opener = { version = "0.8", optional = true }
# ort is needed by magika for ONNX runtime; download-binaries fetches prebuilt binaries
ort = { version = "2.0.0-rc.12", default-features = false, features = ["download-binaries", "tls-rustls"], optional = true }
phf = { version = "0.14", features = ["macros"] }
# plotly backs the `viz` command (charts + auto-dashboard). default-features=false
# keeps the base `viz` build lean; `plotly_embed_js` (via the `viz` feature) makes the
# HTML self-contained, and `static_export_default` (via `viz_static`) adds PNG/SVG/PDF
# export through a webdriver-managed headless browser. NO polars dependency. See #302.
plotly = { version = "0.14.1", default-features = false, optional = true }
# viz UI localization. Locale YAMLs live under src/cmd/locales/ (NOT a top-level
# locales/ dir) so the existing "src/**/*" package include covers them; rust-i18n
# resolves the path relative to CARGO_MANIFEST_DIR at compile time.
# NOTE: the `i18n!` init MUST be invoked at a crate root (src/main.rs) because the
# `t!` macro expands to `crate::_rust_i18n_t!`. See src/cmd/viz_i18n.rs.
rust-i18n = { version = "4.2.1", optional = true }
pragmastat = "14.0"
polars = { version = "0.55", features = [
"asof_join",
"avro",
# "avx512" is x86_64-only — enabled via the
# [target.'cfg(target_arch = "x86_64")'.dependencies] table below
# (AVX-512 is an x86 ISA extension; inert on aarch64 et al.)
# "aws",
"binary_encoding",
# "bitwise",
"business",
# "cloud",
"coalesce",
"cross_join",
"cse",
"csv",
"decompress",
"diagonal_concat",
# "dtype-full" replaced by the specific dtypes qsv uses. The small-int
# dtypes are required: util.rs builds Polars schemas with UInt8/UInt16 for
# small non-negative integer columns, and sqlp's editable .pschema.json
# documents Int8/Int16/UInt8/UInt16 as valid cast targets. These kernels
# are feature-gated in Polars, so they must be enabled explicitly (u8/u16
# were only surviving transitively; i8/i16 were lost with dtype-full).
"dtype-i8",
"dtype-i16",
"dtype-u8",
"dtype-u16",
"dtype-date",
"dtype-datetime",
"dtype-time",
"dtype-duration",
"dtype-categorical",
"dtype-decimal",
# "extract_jsonpath",
"iejoin",
"ipc",
"json",
"lazy",
"list_eval",
"streaming",
# "object",
"parquet",
"performant",
"pivot",
"rank",
"semi_anti_join",
"serde-lazy",
"strings",
# "string_normalize",
# "string_pad",
"sql",
"timezones",
], optional = true }
pyo3 = { version = "0.29", features = ["auto-initialize"], optional = true }
# yaml_serde: serde_yaml fork maintained by The YAML Organization
# https://github.com/yaml/yaml-serde - used by the `profile` command to parse
# CKAN scheming specs (e.g. dataset-druf.yaml).
yaml_serde = { version = "0.10", optional = true }
qsv-dateparser = "0.15"
qsv_docopt = "1.10"
qsv-stats = "0.54"
qsv_currency = "0.7"
qsv-tabwriter = "2"
qsv_vader_sentiment_analysis = { version = "0.2", optional = true }
rand = "0.10"
rand_hc = "0.5"
rand_xoshiro = "0.8"
rayon = "1.12"
redis = { version = "1", features = ["ahash"], default-features = false }
regex = "1"
reqwest = { version = "0.13", features = [
"blocking",
"brotli",
"cookies",
"deflate",
"gzip",
"http2",
"json",
"rustls",
"stream",
"zstd",
], default-features = false }
rfd = { version = "0.17", optional = true }
rmp-serde = { version = "1.3", optional = true }
rust_decimal = { version = "1.42", default-features = false }
sanitize-filename = { version = "0.6", optional = true }
simd-json = "0.17"
self_update = { version = "1.0.0-rc.6", features = [
"archive-zip",
"compression-zip-deflate",
"github",
"progress-bar",
"reqwest",
"rustls",
"signatures",
], default-features = false, optional = true }
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
serde_urlencoded = { version = "0.7", optional = true }
sha2 = { version = "0.11", optional = true }
simdutf8 = "0.1"
spreadsheet-ods = { version = "1", optional = true }
toml = "1.1"
toon-format = { version = "0.5", default-features = false }
smallvec = "1"
snap = "1"
strsim = { version = "0.11", optional = true }
strum = { version = "0.28", features = ["phf"] }
strum_macros = "0.28"
sysinfo = "0.39"
tempfile = "3.27"
terminal-colorsaurus = { version = "1.0", optional = true }
textwrap = { version = "0.16", features = ["terminal_size"] }
thousands = { version = "0.2", optional = true }
threadpool = "1.8"
tikv-jemalloc-ctl = { version = "0.7", optional = true }
tikv-jemallocator = { version = "0.7", optional = true }
time = { version = "0.3.55", optional = true }
titlecase = { version = "3", optional = true }
tokio = { version = "1", features = ["parking_lot", "rt-multi-thread"] }
unicode-width = { version = "0.2", optional = true }
uuid = { version = "1", features = ["v4", "v7"] }
url = "2.5"
webdriver-downloader = { version = "0.17", optional = true }
whatlang = { version = "0.18", optional = true }
xxhash-rust = { version = "0.8", features = ["xxh3"] }
zip = "8"
zmij = "1.0"
zstd = { version = "0.13", optional = true }
[dev-dependencies]
actix-governor = "0.10"
actix-web = { version = "4.13", default-features = false, features = [
"compress-brotli",
"compress-gzip",
] }
assert-json-diff = "2.0"
# for inflating the gzip+base64 payloads viz HTML embeds (see tests/test_viz.rs inflate helpers)
base64-simd = "0.8"
# for verifying the pinned plotly.js CDN Subresource Integrity digest against the bundle qsv
# actually embeds (see cmd::viz plotly_cdn_sri_matches_the_embedded_bundle). A dev-dependency, not
# the optional `profile` sha2, so the oracle runs for EVERY viz test feature set rather than only
# the ones that happen to enable `profile`.
sha2 = "0.11"
flate2 = "1"
newline-converter = "0.3"
# disable these dev dependencies for testing the `to` command
# as they are expensive and slow down the build/CI tests
# postgres = "0.19"
# rusqlite = { version = "0.32", features = ["bundled"] }
quickcheck = { version = "1", default-features = false }
serial_test = { version = "4.0", features = ["file_locks"] }
[patch.crates-io]
# use our tweaked fork of csv crate
# the csv crate underpins a lot of qsv's functionality, so every perf tweak helps
# for details, see https://github.com/dathere/qsv/wiki/Tuned-csv-Fork-Benchmarks
csv = { git = "https://github.com/dathere/rust-csv", branch = "qsv-tuned" }
csv-core = { git = "https://github.com/dathere/rust-csv", branch = "qsv-tuned" }
csv-index = { git = "https://github.com/dathere/rust-csv", branch = "qsv-tuned" }
# csv = { path = "../rust-csv" }
# csv-core = { path = "../rust-csv/csv-core" }
# csv-index = { path = "../rust-csv/csv-index" }
# use latest upstream now that our PR has been merged
csvlens = { git = "https://github.com/YS-L/csvlens", rev = "6acf060" }
# use our patched fork of csvs_convert to bump dependencies until our PR is merged
csvs_convert = { git = "https://github.com/jqnatividad/csvs_convert", branch = "replace-streaming-stats-redux", optional = true }
# use our patched fork of whatlang to bump hashbrown until our PR is merged
whatlang = { git = "https://github.com/jqnatividad/whatlang-rs", branch = "bump-hashbrown-to-16" }
# Our PRs have been merged upstream! We can now use the official plotly crate instead of our fork
# until the next plotly.rs release.
plotly = { git = "https://github.com/plotly/plotly.rs", rev = "00fe0512e9f924bd0fc2edfc6cc617a1604f4e0d" }
# TRACKING: remove this patch when upstream resolves it (see exit conditions below).
#
# Polars upstream (rev d60ecb0+) patches object_store to this fork to add the
# `with_dns_resolver` method (CachingResolver) used in polars-io's cloud client
# (crates/polars-io/src/cloud/options.rs::get_client_options). A dependency's
# [patch] section is IGNORED by Cargo — only the top-level workspace's patches
# apply — so we must replicate polars' patch here, otherwise polars-io fails to
# compile against the published object_store 0.13.x with:
# "no method named `with_dns_resolver` found for struct `ClientOptions`".
#
# Why we can't just turn off polars features to avoid this: the cloud module is
# pulled in by a NON-optional dependency edge, not by a feature we control —
# qsv parquet/ipc/json/streaming → polars `streaming` (json & ipc force it)
# → polars-lazy/streaming → the polars-stream crate
# → polars-stream/Cargo.toml: `polars-io = { features = ["async","file_cache"] }`
# → polars-io file_cache → cloud → http → object_store/http
# → get_client_options() calls `.with_dns_resolver(...)`.
# Since json/ipc/parquet all force `streaming` (and qsv needs all three), there
# is no feature combo that keeps parquet/streaming I/O while dropping the cloud
# module. qsv's own object_store usage (get_cloud) does NOT need this method; the
# patch exists purely to satisfy polars-io. The fork is object_store 0.13.2 plus
# the one extra method, so it's API-compatible with our direct dep and unifies
# the whole tree on one version.
#
# EXIT CONDITIONS (remove this patch when ANY is true):
# 1. `with_dns_resolver` lands in a published object_store release AND polars
# drops its own [patch.crates-io] object_store override; OR
# 2. polars feature-gates the with_dns_resolver call so non-cloud consumers
# don't need the forked method.
#
# SECURITY: this patch also pins the tree to the object_store 0.13 line, which
# pulls quick-xml 0.39.4 and holds RUSTSEC-2026-0194 / -0195 open (both need
# quick-xml >= 0.41.0). object_store already shipped the fix in 0.14 (0.14.1
# requires quick-xml ^0.41.0), but polars-io 0.55.2 requires object_store
# ^0.13.1 and a [patch] must stay semver-compatible with that requirement, so
# 0.14 cannot be forced in. Both advisories clear when polars-io moves to
# object_store 0.14 -- revisit this patch then, since polars will likely need
# the same fork treatment on the 0.14 line. See dathere/qsv#4131 / #4132 and
# the entries in .cargo/audit.toml.
object_store = { git = "https://github.com/kdn36/arrow-rs-object-store", rev = "f50a6e5c564b2b5933eca15cd20ff9b5614374a1" }
# pinned to git master for check_interval::UpdateCheckGuard, which is not yet in a
# published release (still declared 1.0.0-rc.6 upstream). Switch back to the crates.io
# version once an rc/stable ships check_interval.
self_update = { git = "https://github.com/jaemk/self_update", rev = "91b0531a22b76cabf46152fd2aae0b34a75c177e", optional = true }
# use our patched fork until our PR is merged with bumped deps and quick-xml RUSTSEC fixes
spreadsheet-ods = { git = "https://github.com/jqnatividad/spreadsheet-ods", branch = "deps-bump-202607" }
# Polars has a much higher release tempo for its Python bindings compared
# to its underlying Rust library. See https://github.com/pola-rs/polars/releases
# It's qsv's policy to use the latest upstream of polars/py-polars
# to take advantage of Polars' latest unreleased fixes and features.
# Based on what's available at the time of qsv's release, we may need to pin polars to a py-polars tag
# or a specific commit if more revisions have been made since the latest polars/py-polars release.
# When pinning to an unreleased rev, re-add a `polars = { git = ..., rev = ... }`
# entry here AND make sure that rev's own Cargo.toml version matches the
# `version = "x.y.z"` requirement in [dependencies] below — otherwise Cargo
# silently ignores the patch (it shows up as [[patch.unused]] in Cargo.lock) and
# resolves polars from crates.io instead.
# BUILD NOTE: Be sure to set QSV_POLARS_REV to the commit short hash or tag
# of polars/py-polars before building qsv. This allows us to show the polars rev/tag in --version.
# The convention to use for QSV_POLARS_REV is:
# - if we are using a release version of Rust Polars, leave QSV_POLARS_REV empty
# - if we are using a release version of Python Polars, use the Python tag
# (e.g. py-1.19.0)
# - if we are using a commit hash, separate the tag and commit hash with a colon, in the order of
# - Python Polars tag
# - short commit hash
# (e.g. py-1.19.0:52ea381 to indicate that we are Python Polars 1.19.0,
# and the commit hash 52ea381)
# ================================
# QSV_POLARS_REV=
# polars = { git = "https://github.com/pola-rs/polars", tag = "py-1.43.2", optional = true }
# polars = { git = "https://github.com/pola-rs/polars", rev = "f9f8653", optional = true }
# Apache DataSketches (t-digest, HLL, Frequent Items) — upstream C++ does not
# support big-endian targets, so we exclude the crate on big-endian builds.
# Code paths that use it are guarded by #[cfg(not(target_endian = "big"))].
[target.'cfg(not(target_endian = "big"))'.dependencies]
datasketches = { version = "0.3", features = ["frequencies", "hll", "tdigest"] }
# AVX-512 is an x86_64-only ISA extension; Polars' avx512 kernels are inert on
# other targets, so gate the feature to x86_64. Cargo unions these features with
# the base `polars` dependency above, so x86_64 builds get avx512 while
# aarch64 (and other arches) don't carry it. Polars dispatches the AVX-512
# kernels at runtime, so enabling it for all x86_64 builds is safe.
[target.'cfg(target_arch = "x86_64")'.dependencies]
polars = { version = "0.55", features = ["avx512"], optional = true }
[features]
default = ["jemallocator"]
distrib_features = [
"feature_capable",
"apply",
"fetch",
"foreach",
"geocode",
"geoconnex",
"get",
"get_cloud",
"luau",
"mcp",
"polars",
"profile",
"synthesize",
"to",
"viz_static",
]
all_features = ["distrib_features", "magika", "self_update", "ui"]
# NOTE: `get` AND `get_cloud` are both deliberately absent - removing only `get` would be a
# no-op, since `get_cloud = ["get", ...]` re-enables it. `get_cloud` turns on object_store's
# aws/azure/gcp backends, which is the largest feature delta between this build and the
# prebuilt `qsv` (object_store is in BOTH dependency graphs, so it never shows up in a crate
# count - only in a resolved-feature comparison). Dropping it costs qsvmcp the `get` command,
# `dc:` cache-prefix inputs, and s3:///gs://az:// sources.
qsvmcp = ["feature_capable", "geocode", "mcp", "polars", "profile", "self_update", "synthesize", "to", "viz"]
apply = [
"base62",
"base64-simd",
"censor",
"cpc",
"crc32fast",
"eudex",
"gender_guesser",
"qsv_vader_sentiment_analysis",
"strsim",
"thousands",
"titlecase",
"whatlang",
]
clipboard = ["arboard"]
color = ["anstream", "crossterm", "terminal-colorsaurus", "unicode-width"]
fetch = [
"console",
"flate2",
"governor",
"serde_urlencoded",
]
foreach = []
# get: fetch tabular data from local/URL/CKAN/cloud sources into a managed,
# zstd-compressed, BLAKE3-hashed, auto-indexed disk cache. Downloads use ETag/
# Last-Modified conditional revalidation with streaming, ranged (parallel)
# fetches for large objects. Backs the `dc:` input prefix usable by any qsv
# command. See `qsv get --help`.
get = ["zstd", "flate2", "glob"]
# get_cloud: adds cloud object-storage sources (s3://, gs://, az://) to `get`,
# via the object_store crate. Opt-in so a bare `-F get` build stays lean;
# included in distrib_features/qsvmcp/datapusher_plus (where polars already
# pulls object_store). See `qsv get --help`.
get_cloud = ["get", "dep:object_store"]
geocode = [
"bytemuck",
"dns-lookup",
"geosuggest-core",
"geosuggest-utils",
"geozero",
"governor",
"rmp-serde",
]
# luau lookup tables auto-decompress remote .gz/.zlib/.zst/.zip/.sz sources, so
# luau pulls the flate2 + zstd codecs (.zip/.sz need no extra deps). See #1417.
luau = ["mlua", "sanitize-filename", "flate2", "zstd"]
magika = ["dep:magika", "dep:ort"]
mcp = []
polars = ["dep:polars", "bytemuck"]
prompt = ["rfd"]
python = ["pyo3"]
# profile: CKAN scheming-driven metadata extraction (DCAT-US v3 / Croissant).
# Native Rust implementation — minijinja replaces jinja2 for formula
# evaluation; polars (SQL context) backs the SQL-requiring helpers
# (temporal_resolution, guess_accrual_periodicity). yaml_serde parses the
# scheming spec YAML. See `qsv profile --help`.
profile = ["dep:sha2", "polars", "yaml_serde"]
# geoconnex: bundled SHACL-validated linked-data profile for hydrologic
# features (https://docs.geoconnex.us/). Embeds the Geoconnex SHACL
# shapes (~10KB Turtle bundle) so `qsv profile --profile geoconnex
# --validate` can spawn `pyshacl` without external file deps.
# Requires `profile`. Available in qsv (via distrib_features) and as an
# opt-in for qsvdp; NOT in qsvlite or qsvmcp.
geoconnex = ["profile"]
synthesize = ["dep:fake", "dep:time"]
to = ["csvs_convert", "dep:spreadsheet-ods"]
# viz: generate charts (bar/line/scatter/histogram/box) and an auto-dashboard
# (`viz smart`) from CSV data via the plotly crate. Base feature = self-contained
# interactive HTML output (plotly_embed_js); NO polars dependency. `viz smart`
# reuses qsv's in-process stats + frequency caches. See `qsv viz --help` and #302.
# NOT SUPPORTED ON BIG-ENDIAN TARGETS (s390x; also powerpc64 BE) — this applies to BOTH
# `viz` and `viz_static`, and is enforced by a compile_error! in src/cmd/mod.rs. Keep both
# out of big-endian publish workflows.
# NOTE powerpc64LE is LITTLE-endian, so the guard deliberately does not fire there. `viz`
# is simply not enabled for the ppc64le prebuilt: it has no viz CI coverage, and polars
# does not compile on PowerPC (see docs/publishing_assets/qsv-powerpc64le-*.txt).
viz = [
"dep:plotly",
"dep:opener",
"dep:geojson",
"dep:rust-i18n",
"plotly/plotly_embed_js",
"base64-simd",
]
# viz_static: adds static PNG/SVG/PDF/JPEG/WebP export to `viz` via plotly_static,
# which drives a headless Chromium/Firefox (webdriver auto-downloaded). Requires a
# browser at runtime, so keep it out of headless-only publish targets. It also
# inherits `viz`'s big-endian restriction above (enforced at compile time).
# DO NOT enable on Windows publish targets: it pulls ~54 extra crates (plotly_static,
# fantoccini, webdriver-downloader, native-tls, icu_segmenter) and the resulting `qsv`
# release compilation unit does not finish inside GitHub's 6h job cap — observed under
# both fat LTO and thin LTO+PGO instrumentation (run 31243109948). This is also why
# `qsvmcp` uses plain `viz`: publish.yml builds qsvmcp on Windows with --features=qsvmcp.
viz_static = ["viz", "plotly/static_export_default", "webdriver-downloader"]
lens = ["csvlens"]
lite = []
datapusher_plus = [
"base64-simd",
"geocode",
"get",
"get_cloud",
"polars",
"profile",
"self_update",
]
ui = ["clipboard", "color", "prompt", "lens"]
jemallocator = ["tikv-jemallocator", "tikv-jemalloc-ctl"]
# feature_capable backs the always-compiled commands that consume lookup tables
# (validate/template/describegpt). Pull flate2 + zstd so their remote lookups
# auto-decompress .gz/.zlib/.zst (alongside the always-available .zip/.sz). #1417.
# base64-simd backs describegpt's multimodal --context-file (base64-encoding image/PDF
# attachments for the LLM); it's always available wherever describegpt is (non-lite).
feature_capable = ["base64-simd", "flate2", "same-file", "zstd"]
nightly = [
"crc32fast/nightly",
"pyo3/nightly",
"rand/simd_support",
"simd-json/hints",
"foldhash/nightly",
]
nightly-polars =[
"polars/nightly",
"polars/simd",
]
[package.metadata.deb]
maintainer = "Konstantin Sivakov <konstantin@datHere.com>"
copyright = "2015, Andrew Gallant; 2026, datHere Inc. <www.dathere.com>"
license-file = ["LICENSE-MIT", "0"]
extended-description = """A high performance CSV data-wrangling toolkit."""
depends = "$auto"
section = "utility"
priority = "optional"
# Default feature and asset. THIRD_PARTY_NOTICES.md ships alongside the binary
# so the vendored MIT/BSD notices travel with the package, as those licenses
# require; license-file above generates /usr/share/doc/qsv/copyright.
features = ["feature_capable"]
assets = [
["target/release/qsv", "/usr/local/bin/", "755"],
["THIRD_PARTY_NOTICES.md", "/usr/share/doc/qsv/", "644"],
]
# Conditional features and assets
# qsvlite (`lite = []`) pulls in none of the vendored third-party components — no viz
# (plotly/DataTables), no luau (LuaDate), no profile (DCAT/geoconnex schemas) — so it ships only
# qsv's own license, via the inherited `license-file` above. Shipping the notices file here would
# credit components this binary does not contain.
[package.metadata.deb.variants.lite]
features = ["lite"]
assets = [["target/release/qsvlite", "/usr/local/bin/", "755"]]
# qsvdp DOES vendor third-party content: `datapusher_plus` enables `profile`, which embeds the
# DCAT-US (CC0-1.0), DCAT-AP (CC-BY-4.0) and geoconnex (Apache-2.0) schemas. CC-BY-4.0 requires
# attribution, so the notices must ship with this package too. `assets` REPLACES the parent
# table's list rather than extending it, hence the explicit repeat.
[package.metadata.deb.variants.datapusher_plus]
features = ["datapusher_plus"]
assets = [
["target/release/qsvdp", "/usr/local/bin/", "755"],
["THIRD_PARTY_NOTICES.md", "/usr/share/doc/qsvdp/", "644"],
]