stac-wasm
v0.0.3
Published
Converts Arrow arrays to STAC items, via WASM
Readme
stac-wasm
Converts Arrow arrays to SpatioTemporal Asset Catalog (STAC) items, via WebAssembly (WASM).
[!WARNING] This package is in an "alpha" state and will likely break and change a lot.
Usage
npm i stac-wasmWe give you two functions:
import * as stac_wasm from "stac-wasm";
const table = loadArrowTable(); // e.g. from DuckDB
const items = stac_wasm.arrowToStacJson(table);
const bytes = stac_wasm.stacJsonToParquet(items);Tests
We don't have automated tests.
If you want to play with the function, modify www/index.js and then:
cd www
npm run startThis should open a page at http://localhost:8080/ that you can use to test out the WASM library.
Contributing
stac-wasm is part of rustac, a monorepo that includes the Rust code used to build the WASM module. See CONTRIBUTING.md for instructions on contributing to the monorepo. If your on MacOS, you might have to use llvm as described in this comment.
Releasing
wasm-pack build
wasm-pack login
cd pkg
npm publish