Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.34 KB

File metadata and controls

55 lines (38 loc) · 1.34 KB

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-wasm

We 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 have some simple automated tests:

yarn install
yarn test

If you want to play with the function, modify www/index.js and then:

cd www
yarn start

This 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