diff --git a/Cargo.lock b/Cargo.lock index 895d7461..d61b2578 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -331,7 +331,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -342,18 +342,7 @@ checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", + "syn", ] [[package]] @@ -439,7 +428,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -482,45 +471,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive", - "clap_lex", - "indexmap", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -704,7 +654,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -804,21 +754,6 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "http" version = "0.2.9" @@ -1180,12 +1115,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" - [[package]] name = "parquet" version = "46.0.0" @@ -1238,7 +1167,6 @@ dependencies = [ "async-compat", "async-stream", "bytes", - "clap", "console_error_panic_hook", "futures", "getrandom", @@ -1308,30 +1236,6 @@ dependencies = [ "array-init-cursor", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-hack" version = "0.5.20+deprecated" @@ -1495,7 +1399,7 @@ checksum = "6f4c2c6ea4bc09b5c419012eafcdb0fcef1d9119d626c8f3a0708a5b92d38a70" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -1573,23 +1477,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.28" @@ -1601,21 +1488,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.48" @@ -1633,7 +1505,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -1696,7 +1568,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -1831,7 +1703,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn", "wasm-bindgen-shared", ] @@ -1865,7 +1737,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1939,15 +1811,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index 9551a638..3441ead3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ async = [ "dep:async-stream", "parquet?/async", ] -debug = ["console_error_panic_hook", "clap"] +debug = ["console_error_panic_hook"] brotli = ["parquet?/brotli", "parquet2?/brotli"] gzip = ["parquet?/flate2", "parquet2?/gzip"] @@ -97,9 +97,6 @@ bytes = { version = "1", optional = true } serde-wasm-bindgen = { version = "0.6", optional = true } -# 3.2 added deprecations that don't currently pass clippy -clap = { version = ">=3.1.15, <3.3", optional = true, features = ["derive"] } - wasm-bindgen-futures = { version = "0.4.30", optional = true } futures = { version = "0.3", optional = true } range-reader = { version = "0.2", optional = true } @@ -143,22 +140,6 @@ skip_optional_dependencies = true # Exclude certain features from the build matrix denylist = ["full", "all_compressions", "default"] -[[bin]] -name = "read_parquet" -required-features = ["debug", "arrow1", "reader"] - -[[bin]] -name = "write_parquet" -required-features = ["debug", "arrow1", "writer"] - -[[bin]] -name = "read_parquet2" -required-features = ["debug", "arrow2", "reader"] - -[[bin]] -name = "write_parquet2" -required-features = ["debug", "arrow2", "writer"] - [profile.release] # Tell `rustc` to optimize for small code size. # As of 3/15/22, opt-level = s was smallest diff --git a/README.md b/README.md index 63d6f4db..f5ee4c31 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,7 @@ By default, `arrow`, `all_compressions`, `reader`, and `writer` features are ena - `snappy`: Activate Snappy compression. - `zstd`: Activate ZSTD compression. - `lz4`: Activate LZ4_RAW compression (only applies to the `arrow2` endpoints). -- `debug`: Expose the `setPanicHook` function for better error messages for Rust panics. Additionally compiles CLI debug functions. +- `debug`: Expose the `setPanicHook` function for better error messages for Rust panics. ## Node <20 diff --git a/src/bin/read_parquet.rs b/src/bin/read_parquet.rs deleted file mode 100644 index 52c62b25..00000000 --- a/src/bin/read_parquet.rs +++ /dev/null @@ -1,35 +0,0 @@ -use clap::Parser; -// use parquet_wasm::arrow1::reader::read_parquet; -// use std::fs; -use std::path::PathBuf; -// use std::process; - -#[derive(Parser, Debug)] -#[clap(author, version, about, long_about = None)] -struct Args { - /// Path to input file - #[clap(short, long)] - input_file: PathBuf, - - /// Path to output file - #[clap(short, long)] - output_file: PathBuf, -} - -fn main() { - // let args = Args::parse(); - - // // Read file to buffer - // let data = fs::read(&args.input_file).expect("Unable to read file"); - - // // Call read_parquet - // let arrow_ipc = read_parquet(data) - // .map_err(|err| { - // eprintln!("Could not read parquet file: {}", err); - // process::exit(1); - // }) - // .unwrap(); - - // // Write result to file - // fs::write(&args.output_file, arrow_ipc).expect("Unable to write file"); -} diff --git a/src/bin/read_parquet2.rs b/src/bin/read_parquet2.rs deleted file mode 100644 index a8464095..00000000 --- a/src/bin/read_parquet2.rs +++ /dev/null @@ -1,34 +0,0 @@ -use clap::Parser; -// use parquet_wasm::arrow2::reader::read_parquet; -// use std::fs; -use std::path::PathBuf; -// use std::process; - -#[derive(Parser, Debug)] -#[clap(author, version, about, long_about = None)] -struct Args { - /// Path to input file - #[clap(short, long)] - input_file: PathBuf, - - /// Path to output file - #[clap(short, long)] - output_file: PathBuf, -} - -fn main() { - // This doesn't work right now because WasmResult doesn't implement Debug - todo!() - // let args = Args::parse(); - - // // Read file to buffer - // let data = fs::read(&args.input_file).expect("Unable to read file"); - // let slice = data.as_slice(); - - // // Call read_parquet - // let ipc_buffer = read_parquet(slice) - // .unwrap().into_ipc().unwrap(); - - // // Write result to file - // fs::write(&args.output_file, ipc_buffer).expect("Unable to write file"); -} diff --git a/src/bin/write_parquet.rs b/src/bin/write_parquet.rs deleted file mode 100644 index 1cd0dcf4..00000000 --- a/src/bin/write_parquet.rs +++ /dev/null @@ -1,43 +0,0 @@ -use clap::Parser; -// use parquet_wasm::arrow1::writer::write_parquet; -// use parquet_wasm::arrow1::writer_properties::WriterPropertiesBuilder; -// use parquet_wasm::common::writer_properties::Compression; -// use std::fs; -use std::path::PathBuf; -// use std::process; - -/// Simple program to greet a person -#[derive(Parser, Debug)] -#[clap(author, version, about, long_about = None)] -struct Args { - /// Path to input file - #[clap(short, long)] - input_file: PathBuf, - - /// Path to output file - #[clap(short, long)] - output_file: PathBuf, -} - -fn main() { - // let args = Args::parse(); - - // // Read file to buffer - // let data = fs::read(&args.input_file).expect("Unable to read file"); - // let slice = data.as_slice(); - - // // Call read_parquet - // let writer_properties = WriterPropertiesBuilder::new() - // .set_compression(Compression::SNAPPY) - // .build(); - - // let arrow_ipc = write_parquet(slice, writer_properties) - // .map_err(|err| { - // eprintln!("Could not write parquet file: {}", err); - // process::exit(1); - // }) - // .unwrap(); - - // // Write result to file - // fs::write(&args.output_file, arrow_ipc).expect("Unable to write file"); -} diff --git a/src/bin/write_parquet2.rs b/src/bin/write_parquet2.rs deleted file mode 100644 index 351bfe2c..00000000 --- a/src/bin/write_parquet2.rs +++ /dev/null @@ -1,46 +0,0 @@ -use clap::Parser; -// use parquet_wasm::arrow2::writer::write_parquet; -// use parquet_wasm::arrow2::writer_properties::WriterPropertiesBuilder; -// use parquet_wasm::common::writer_properties::Compression; -// use std::fs; -use std::path::PathBuf; -// use std::process; - -/// Simple program to greet a person -#[derive(Parser, Debug)] -#[clap(author, version, about, long_about = None)] -struct Args { - /// Path to input file - #[clap(short, long)] - input_file: PathBuf, - - /// Path to output file - #[clap(short, long)] - output_file: PathBuf, -} - -fn main() { - // `wasm_bindgen::JsError` doesn't implement `std::fmt::Debug` - todo!() - // let args = Args::parse(); - - // // Read file to buffer - // let data = fs::read(&args.input_file).expect("Unable to read file"); - // let slice = data.as_slice(); - - // // Call read_parquet - // let writer_properties = WriterPropertiesBuilder::new() - // .set_compression(Compression::SNAPPY) - // .build(); - - // let table = Table::from_ipc(slice.to_vec()).unwrap(); - // let arrow_ipc = write_parquet(slice, writer_properties) - // .map_err(|err| { - // eprintln!("Could not write parquet file: {}", err); - // process::exit(1); - // }) - // .unwrap(); - - // // Write result to file - // fs::write(&args.output_file, arrow_ipc).expect("Unable to write file"); -}