>_EXECUTIVE SUMMARY
stryke-parquet is one of the opt-in connector packages in the stryke ecosystem. Parquet file inspector for stryke — schema, footer stats, row-group breakdown, head/tail, recompression. Diagnostic counterpart to stryke-arrow.
Schema + footer / row-group introspection is a different workload from reading parquet into a typed DataFrame. Lightweight tool for ops + debugging.
~ARCHITECTURE
In-process cdylib design: the stryke side is a thin .stk wrapper that calls FFI symbols on the dlopen'd library. No subprocess, no pipe — calls return on the same thread that made them.
| Layer | Implementation |
|---|---|
stryke wrappers (lib/*.stk) | Thin .stk wrapper (Parquet); exposes typed helpers that serialize args to JSON and parse the response |
cdylib (libstryke_parquet.{dylib,so}) | Single Rust cdylib crate; every public surface fn is an extern "C" fn parquet__<verb>(*const c_char) -> *mut c_char |
| Process model | Library is dlopen'd once per stryke session on first use Parquet; stateless — parquet operations are file transforms with no process-level cache; lives until the runtime exits |
| Build | Cargo with [lib] crate-type = ["cdylib"]; publish = false; the package itself ships via s pkg install -g . |
| Install path | ~/.stryke/store/parquet@<version>/ after make install; use Parquet from any stryke script resolves it |
| Tests | zunit-style under t/ with live-service variants when applicable |
| CI | GitHub Actions .github/workflows/ci.yml — cargo fmt + clippy + test, plus stryke pkg install verification |
$WHY OPT-IN (NOT BUILTIN)
Schema + footer / row-group introspection is a different workload from reading parquet into a typed DataFrame. Lightweight tool for ops + debugging.
The trade-off is intentional. The core stryke binary stays under ~40 MB precisely because each connector ships separately. Daily-driver work (one-liners, awk replacement, data scripting) doesn't need MongoDB drivers, AWS SDKs, or Spark Connect bindings linked in.
&FFI ENVELOPE
JSON in / JSON out across the FFI boundary. Each Parquet::* wrapper serializes its args to a JSON dict and calls the matching parquet__* symbol resolved out of libstryke_parquet.{dylib,so}; the cdylib returns a JSON CString the wrapper parses. The exports span inspection (version, inspect, schema, dtypes, count, rowgroups, row_group_summary, stats, metadata, schema_diff), row read (head, tail, slice, sample, reverse, gather, random_sample, to_json, to_csv, to_ndjson, column), row predicates and reshaping (filter, where_count, filter_to, distinct, sort, top_k, value_counts, group_by), aggregates (sum, min, max, mean, n_unique, quantile, describe), conversion and write (from_csv, from_json, write, write_partitioned, compress, repartition, merge, hstack, select, drop, rename, with_row_index), and diagnostics (validate, column_chunk_stats, size_report, null_summary, encoding_summary, bloom_filter_summary, sorting_columns_summary, features); the authoritative list is [ffi].exports in stryke.toml. The returned CString is freed via the cdylib-exported stryke_free_cstring, wired automatically by rust_ffi::load_cdylib.
# request shape (built by the .stk wrapper)
{"verb": "<op>", "...": ...}
# response shape
{"result": ...} # success — per-fn shape
{"error": "<msg>"} # failure — wrapper die()s with the message
/SCOPE
See the README's "What this is (and what it isn't)" + "API reference" sections for the authoritative scope. The package is intentionally narrower than its underlying SDK / driver — the goal is "useful from a shell pipeline", not "complete API coverage".
%PUBLIC SURFACE
61 public Parquet::* functions backed by 57 parquet__* FFI exports (the remainder are pure-stryke composites — column_names, column_count, is_empty, median — built over other calls). Grouped by intent below; the full annotated reference with return shapes is the README "API reference", and the canonical export list is [ffi].exports in stryke.toml.
| Group | Functions |
|---|---|
| Inspection & schema (footer-only) | version · inspect · schema · dtypes · count · rowgroups · row_group_summary · stats · metadata · schema_diff · column_names · column_count · is_empty |
| Reading rows | head · tail · slice · sample · reverse · gather · random_sample · to_json · stream · column |
| Predicates & reshaping | filter · where_count · filter_to · distinct · sort · top_k · value_counts · group_by |
| Aggregates | sum · min · max · mean · n_unique · quantile · median · describe |
| Conversion & writing | to_csv · to_ndjson · from_csv · from_json · write · write_partitioned · compress · repartition · merge · hstack · select · drop · rename · with_row_index |
| Diagnostics | validate · column_chunk_stats · size_report · null_summary · encoding_summary · bloom_filter_summary · sorting_columns_summary · features |
+DEPENDENCIES
The cdylib is built on the same parquet + arrow crate family as stryke-arrow; the JSON envelope uses serde_json with preserve_order so column order survives round-trips. Compression backends are compiled into the parquet crate's feature set.
| Crate | Version | Role |
|---|---|---|
parquet | 58 | parquet reader/writer; codec features snap / brotli / flate2 / lz4 / zstd / base64 |
arrow, arrow-json, arrow-csv | 58 | columnar bridge + CSV/JSON conversion |
serde / serde_json | 1 | FFI JSON envelope (preserve_order) |
anyhow | 1 | error propagation into the {"error": ...} envelope |
once_cell | 1 | lazily-initialized statics |
Release profile: opt-level = 3, lto = "thin", codegen-units = 1, strip = true, panic = "abort".
#PROJECT METADATA
| Item | Value |
|---|---|
| License | MIT |
| Author | MenkeTechnologies |
| Repository | github.com/MenkeTechnologies/stryke-parquet |
| Parent language | strykelang |
| Meta umbrella | MenkeTechnologiesMeta |
| Issues | github.com/MenkeTechnologies/stryke-parquet/issues |