Tip
While you can pronounce "rustac" however you'd like, we like "ruh-stac".
Command Line Interface (CLI) and Rust libraries for the SpatioTemporal Asset Catalog (STAC) specification. We have a Python package based on rustac that lives in its own repository, rustac-py. For more on the difference between rustac and rustac-py, see our docs.
Note
Until 2025-04-17, this repository was named stac-rs. See this RFC for context on the name change.
rustac "speaks" three forms of STAC:
- JSON: STAC is derived from GeoJSON
- Newline-delimited JSON (ndjson): One JSON item per line, often used for bulk item loading and storage
- stac-geoparquet: A newer specification for storing STAC items, and optionally collections
We also have interfaces to other storage backends, e.g. Postgres via pgstac.
Our command line interface (CLI) can query STAC APIs, validate STAC, and more. Install:
python -m pip install rustac
# or
cargo install rustac
Then:
# Search
$ rustac search https://landsatlook.usgs.gov/stac-server \
--collections landsat-c2l2-sr \
--intersects '{"type": "Point", "coordinates": [-105.119, 40.173]}' \
--sortby='-properties.datetime' \
--max-items 1000 \
items.parquet
# Translate formats
$ rustac translate items.parquet items.ndjson
$ rustac translate items.ndjson items.json
# Migrate STAC versions
$ rustac translate item-v1.0.json item-v1.1.json --migrate
# Search stac-geoparquet (no API server required)
$ rustac search items.parquet
# Server
$ rustac serve items.parquet # Opens a STAC API server on http://localhost:7822
# Validate
$ rustac validate item.json
This monorepo contains several crates:
Crate | Description | Badges |
---|---|---|
stac | Core data structures and I/O | |
stac-api | Data structures for the STAC API specification | |
stac-extensions | Basic support for STAC extensions | |
rustac | Command line interface | |
stac-server | STAC API server with multiple backends | |
pgstac | Bindings for pgstac | |
stac-duckdb | Experimental client for duckdb |
graph TD
stac --> stac-api
stac --> stac-extensions
stac --> rustac
stac --> pgstac
stac --> stac-duckdb
stac --> stac-server
stac-api --> pgstac
stac-api --> stac-duckdb
stac-api --> stac-server
stac-api --> rustac
pgstac --> stac-server
stac-duckdb --> stac-server
stac-server --> rustac
Note
There's one additional crate in crates, stac-derive. This is not published and is for internal use only.
See CONTRIBUTING.md for information about contributing to this project. See RELEASING.md for a checklist to use when releasing a new version.
rustac is dual-licensed under both the MIT license and the Apache license (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.