-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathCargo.toml
97 lines (79 loc) · 2.89 KB
/
Cargo.toml
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
[package]
name = "parquet-wasm"
version = "0.3.1"
authors = ["Kyle Barron <[email protected]>"]
edition = "2021"
description = "WebAssembly Parquet reader and writer."
readme = "README.md"
repository = "https://github.com/kylebarron/parquet-wasm"
license = "MIT OR Apache-2.0"
keywords = ["parquet", "webassembly", "arrow"]
categories = ["wasm"]
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["arrow1", "all_compressions", "reader", "writer"]
arrow1 = ["dep:arrow", "dep:parquet"]
arrow2 = ["dep:arrow2", "dep:parquet2"]
reader = []
writer = []
debug = ["console_error_panic_hook", "clap"]
brotli = ["parquet?/brotli", "parquet2?/brotli"]
gzip = ["parquet?/flate2", "parquet2?/gzip"]
snappy = ["parquet?/snap", "parquet2?/snappy"]
zstd = ["parquet?/zstd", "parquet2?/zstd"]
# LZ4 not yet supported on parquet crate
lz4 = ["parquet2?/lz4_flex"]
all_compressions = ["brotli", "gzip", "snappy", "zstd", "lz4"]
# Full list of available features
full = ["arrow1", "arrow2", "debug", "all_compressions", "reader", "writer"]
[dependencies]
wasm-bindgen = "0.2.80"
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.6", optional = true }
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# compared to the default allocator's ~10K. It is slower than the default
# allocator, however.
# if wee_alloc only saves 10KB, might not be worth the slower allocation speed?
# wee_alloc = "0.4.5"
js-sys = "0.3.53"
getrandom = { version = "0.2.6", features = ["js"] }
web-sys = { version = "0.3", features = ["console"] }
arrow2 = { version = "0.11", optional = true, features = [
"io_ipc",
"io_parquet",
] }
# parquet2 is only used indirectly through arrow2, but we define it here so that we can turn on
# parquet2 features as needed, e.g. with --features parquet2/gzip
parquet2 = { version = "0.12", default_features = false, optional = true, features = [
"stream",
] }
arrow = { version = "12.0.0", default-features = false, optional = true }
parquet = { version = "12.0.0", default-features = false, optional = true, features = [
"arrow",
"base64",
] }
clap = { version = "3.1.15", optional = true, features = ["derive"] }
[dev-dependencies]
wasm-bindgen-test = "0.3.13"
[[bin]]
name = "read_parquet"
required-features = ["debug", "arrow1"]
[[bin]]
name = "write_parquet"
required-features = ["debug", "arrow1"]
[[bin]]
name = "read_parquet2"
required-features = ["debug", "arrow2"]
[[bin]]
name = "write_parquet2"
required-features = ["debug", "arrow2"]
[profile.release]
# Tell `rustc` to optimize for small code size.
# As of 3/15/22, opt-level = s was smallest
# https://github.com/kylebarron/parquet-wasm/pull/48
opt-level = "s"
lto = true