Skip to content

Rust crate ​

The tetration crate provides read/write helpers for .tet files, a query engine, format conversion, and an optional C ABI for FFI bindings.

API documentation ​

Full type-level API reference: docs.rs/tetration

This site covers usage patterns and cookbooks. Prefer docs.rs for struct fields, trait bounds, and module listings.

What the crate provides ​

ModuleRole
catalogFile layout, TetFile, TetWriterSession, packages, PackageStore
queryJSON/TOML parse, plan, execute, materialize, store-backed execute
convertHDF5 / NetCDF / Zarr / NumPy / CSV / Parquet import
exportZarr / HDF5 / NetCDF export
verify / repairFile health
jobJob-file executor (run_job_path) — Job files
ffiC ABI behind tetration-ffi feature

Install ​

bash
cargo add tetration
# optional S3Store / MinIO:
cargo add tetration --features tetration-s3

Requires Rust 1.95+. Current crates.io line: 0.8.3 (see version alignment).

Sections ​

Embedder flow ​

  1. Write — TetWriterSession::create → push_dataset with TetDatasetWrite::f32_row_major, f64_row_major, or row_major(dtype, …) → commit(). Streaming grids use TetDatasetStreamSpec (same builders) and commit_with_fill.
  2. Read / aggregate — TetFile::open → execute_query_json → QueryResponse
  3. Dense tensors — materialize_query_selection or materialize_query_transform_ram → DenseMaterializeOutcome

Examples in the repo ​

bash
cargo run --example create_and_query
cargo run --example session_write
cargo run --example inspect_catalog