Skip to content

Rust API ​

The core is a normal Rust crate — crate-type = ["cdylib", "rlib"] — so it is usable directly from Rust, not only through the WebAssembly bindings. These pages are generated by cargo doc from the /// comments in rust/.

Open the Rust API in a new tab →

Where to start ​

ItemWhat it covers
write_shapefileGeoJSON to .shp/.shx/.dbf bytes
read_shapefileThose bytes back to GeoJSON
schema.dbf column inference and field naming
geometryGeoJSON to the concrete shapefile shape types
readRing re-nesting, winding, and .dbf encodings
errorEvery failure mode, with the feature index where one applies

The crate deliberately knows nothing about zip files, projections or browsers. It converts between GeoJSON and shapefile bytes and stops there — see Architecture for why.

Released under the MIT License.