Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
844 lines (810 loc) · 34.7 KB
/
Copy pathCargo.toml
File metadata and controls
844 lines (810 loc) · 34.7 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
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
[package]
name = "qsv"
version = "24.0.0" #: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"
keywords = ["csv", "geocode", "data-engineering", "etl", "opendata"]
categories = ["command-line-utilities", "parser-implementations"]
license = "MIT"
autotests = false
edition = "2024"
rust-version = "1.99"
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
[profile.dev]
debug = "line-tables-only" # or 0 if you rarely use a debugger
[profile.dev.package."*"]
debug = 0 # no debuginfo for deps
opt-level = 1 # optional: faster test runtime for heavy deps (polars etc.), slower first build
# Fast "near-release" profile for perf iteration
[profile.release-dev]
inherits = "release-luau"
lto = "thin"
codegen-units = 16
incremental = true
[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"] }
bytecount = "0.6"
bytemuck = { version = "1.24", features = [
"latest_stable_rust",
], optional = true }
byteorder = "1.5"
bytes = "1"
cached = { version = "4", 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 = "4", optional = true }
directories = "6.0"
dotenvy = "0.15"
dunce = "1"
dynfmt2 = { version = "0.4", default-features = false, features = ["curly"] }
# only used to validate --default-encoding labels up front (fetch/fetchpost).
# reqwest's charset feature does the actual decoding, but Encoding::for_label()
# silently falls back to UTF-8 on an unknown label, so we reject typos early.
# No compile cost: encoding_rs is already built via calamine/csv-nose/reqwest.
# Being a direct dep also lets the `nightly` feature turn on its nightly-only
# simd-accel (+ std, which multiversions more x86 code paths) for the whole dep tree.
encoding_rs = "0.8"
eudex = { version = "0.1", optional = true }
ext-sort = { version = "0.1", default-features = false, features = ["memory-limit"] }
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 the --output-is-input guard (util::check_output_is_not_input)
# and `denull --apply`; already in the tree via walkdir. NON-optional on purpose: the guard
# prevents silent data loss and must be present in every binary, including qsvlite/qsvdp,
# which do not enable `feature_capable`.
same-file = "1.0.6"
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.5", features = ["geoip2"], optional = true }
geosuggest-utils = { version = "0.8.5", 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.7"
itertools = "0.15"
itoa = "1"
jaq-core = "3"
jaq-json = { version = "2", features = ["serde"] }
jaq-std = "3"
jsonschema = { version = "0.58", features = [
"resolve-file",
"resolve-http",
"tls-aws-lc-rs",
], default-features = false }
libc = "0.2"
log = "0.4"
magika = { version = "1.1", optional = true }
memchr = "2"
memmap2 = "0.9"
mimalloc = { version = "0.1", default-features = false, features = [
"extended",
], optional = true }
minijinja = { version = "3.0", features = [
"json",
"loop_controls",
"serde",
"speedups",
"stacker",
"urlencode",
] }
minijinja-contrib = { version = "3.0", 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.14", 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.9", 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-readstat-rs = { version = "0.24.2", optional = true }
polars = { version = "0.55", features = [
# "approx_quantile" powers the APPROX_QUANTILE SQL aggregate in sqlp. It is
# NOT in any umbrella qsv enables (upstream keeps it in docs-selection/full
# only), so without it polars-sql cfg-gates the function out entirely and
# sqlp rejects it as "unsupported function 'approx_quantile'".
"approx_quantile",
"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.19"
qsv_docopt = "1.10"
qsv-stats = "0.56"
qsv_currency = "0.8"
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",
# query: RequestBuilder::query(), used by `geocode geoclient`. Listed EXPLICITLY for the same
# reason as charset below: all_features enables it by accident through other dependents of
# reqwest, so a local all_features build compiles while narrower feature sets (e.g. CI's
# Linux job) fail with "no method named `query`".
"query",
"rustls",
"stream",
"zstd",
# charset: makes Response::text() honor the Content-Type charset= parameter
# (via encoding_rs) and strip BOMs, instead of a blind from_utf8_lossy.
# Listed EXPLICITLY on purpose: with all_features this already arrives by
# accident, because cpc (via `apply`) and plotly_static (via `viz_static`)
# depend on reqwest WITHOUT default-features=false, and reqwest's defaults
# include charset. qsvlite/qsvdp/qsvmcp get it from nowhere else, and
# dropping `apply`/`viz_static` would otherwise silently regress .text()
# back to lossy UTF-8. Pulls encoding_rs + mime, both already in the tree.
"charset",
# system-proxy: hyper-util/client-proxy-system - resolves OS-level proxy
# configuration (macOS SystemConfiguration, Windows registry) in addition
# to the HTTP_PROXY/HTTPS_PROXY environment variables. Same accidental
# unification story as charset (cpc, plotly_static, and polars-io).
"system-proxy",
], 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.18"
self_update = { version = "1.2", 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.7", 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", "time"] }
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.14", 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]
# polars-readstat-rs depends on these directly; redirect them onto the same git polars
# revision qsv pins, otherwise a second, incompatible polars tree resolves from crates.io.
polars-core = { git = "https://github.com/pola-rs/polars", rev = "099c28632d62ce41e941f88c4210a300650f7188" }
polars-arrow = { git = "https://github.com/pola-rs/polars", rev = "099c28632d62ce41e941f88c4210a300650f7188" }
# Polars (since py-2.0.0) calls HashTable::prefetch_{get,insert}, which exist only in its
# hashbrown fork (https://github.com/rust-lang/hashbrown/pull/727). Polars' own workspace
# [patch] doesn't propagate to dependents, so mirror it here; keep the rev in sync with the
# [patch.crates-io] section of the pinned polars rev's Cargo.toml. Drop once #727 is released.
hashbrown = { git = "https://github.com/pola-rs/hashbrown", rev = "d76a6f81abd8f388676aff15068236a8d21c7e1a" }
# 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" }
# 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=py-2.0.0:099c286
# polars = { git = "https://github.com/pola-rs/polars", tag = "py-2.0.0", optional = true }
polars = { git = "https://github.com/pola-rs/polars", rev = "099c28632d62ce41e941f88c4210a300650f7188", 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.5", 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 }
# geosuggest-core builds the tiny Geonames index at test time from the committed TSVs under
# resources/test/geonames-mini/ (see tests/test_viz_geocode_auto.rs). A committed .rkyv would
# silently break on every geosuggest bump (the layout is version-coupled); building it with the
# Cargo.lock-unified crate version removes that risk by construction.
#
# It pulls kiddo, whose build script calls yep_cache_line_size::get_cache_line_size()
# unconditionally — and that crate exports nothing outside x86/x86_64/arm/aarch64, so the build
# script fails to compile (E0425) when kiddo is built NATIVELY on any other host. Build scripts
# compile for the HOST, so cross-compiling is unaffected; it is the native runners that break.
# Dev-dependencies are built by `cargo test` regardless of --features, so an unconditional entry
# broke the s390x CI job even though it never enables `geocode`.
#
# The cfg below is an ALLOWLIST of the architectures yep-cache-line-size actually supports (it
# mirrors that crate's own cfg in its lib.rs). It is deliberately NOT `not(target_endian = "big")`:
# the constraint is architectural, not endianness. ppc64le is little-endian yet still outside
# x86/ARM, so an endian gate left rust-ppc64le.yml — a native `cargo test` runner using the same
# feature list as s390x — just as broken. Add an arch here only when yep-cache-line-size gains it.
#
# Nothing is lost on the excluded arches: the sole consumer, tests/test_viz_geocode_auto.rs, is
# gated on `viz` + `geocode`, and neither the s390x nor the ppc64le job enables either one.
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm", target_arch = "aarch64"))'.dev-dependencies]
geosuggest-core = "0.8.5"
[features]
default = ["jemallocator"]
# NOTE: no publish workflow builds the prebuilt `qsv` with distrib_features. Each one passes an
# explicit --features list that INTENTIONALLY leaves out `get`, `get_cloud` and `geoconnex`
# (see #4737). So the prebuilt `qsv`/`qsvpy*` binaries have no `get` command, no `dc:` inputs,
# no s3:///gs:///az:// sources and no `profile --profile geoconnex`. Users who need them can
# use the prebuilt `qsvdp` (get + get_cloud) or build from source with
# -F distrib_features, or selectively with -F feature_capable,get[,get_cloud] /
# -F feature_capable,geoconnex (the `qsv` bin requires feature_capable).
distrib_features = [
"feature_capable",
"apply",
"fetch",
"foreach",
"geocode",
"geoconnex",
"get",
"get_cloud",
"luau",
"mcp",
"polars",
"profile",
"readstat",
"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 a
# distrib_features `qsv` build (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",
"readstat",
"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/datapusher_plus (where polars already pulls
# object_store). NOT in qsvmcp, and NOT in the prebuilt `qsv` (see the NOTE
# above distrib_features). 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"]
readstat = ["dep:polars-readstat-rs", "polars"]
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 source builds of qsv (via distrib_features)
# and as an opt-in for qsvdp; NOT in qsvlite, qsvmcp, or any prebuilt binary
# (see the NOTE above distrib_features).
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 Chrome/Chromium through chromedriver. NOT Firefox: this
# resolves to plotly_static/chromedriver, and chromedriver/geckodriver are mutually
# exclusive upstream features, so a geckodriver can never serve this build (#4620).
# The driver is auto-downloaded AT BUILD TIME into $HOME/.local/bin and its absolute
# path is baked in via option_env!("WEBDRIVER_DOWNLOAD_PATH"), which is meaningless on
# an end user's machine - cmd::viz::ensure_webdriver_path() repairs that at runtime by
# probing for a real chromedriver. 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", "zstd"]
nightly = [
"crc32fast/nightly",
"pyo3/nightly",
"rand/simd_support",
"simd-json/hints",
"foldhash/nightly",
"encoding_rs/simd-accel",
"encoding_rs/std",
]
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",
],
]