| Crates.io | versatiles |
| lib.rs | versatiles |
| version | 3.4.0 |
| created_at | 2023-01-25 17:33:22.639653+00 |
| updated_at | 2026-01-23 14:46:31.102053+00 |
| description | A toolbox for converting, checking and serving map tiles in various formats. |
| homepage | https://versatiles.org |
| repository | https://github.com/versatiles-org/versatiles-rs |
| max_upload_size | |
| id | 767659 |
| size | 356,188 |
A Rust library and CLI for reading, writing, and converting map tiles.
VersaTiles provides both a command-line interface and a Rust library for working with map tile containers in various formats including MBTiles, PMTiles, VersaTiles, TAR, and directory structures.
For CLI usage, installation instructions, command documentation, and production deployment guides, see the main VersaTiles README.
The CLI provides commands for:
convert: Convert between tile formatsprobe: Inspect tile containersserve: Run an HTTP tile serverdev: Development server with hot reloadThe versatiles crate can be used as a library to integrate tile processing into your Rust applications.
cargo add versatiles
Or see crates.io/crates/versatiles for version info and docs.rs/versatiles for API documentation.
use versatiles::{
container::*,
core::*,
};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let runtime = TilesRuntime::default();
let reader = runtime.get_reader_from_str("input.pmtiles").await?;
// Define the output filename
let output_path = std::env::temp_dir().join("output.versatiles");
// Write the tiles to the output file
runtime.write_to_path(reader, &output_path).await?;
println!("Tiles converted successfully!");
Ok(())
}
cli (default): Command-line interfaceserver (default): HTTP tile servergdal (optional): GDAL raster support for reading GeoTIFF and other raster formatsVersaTiles is built from several focused crates that can be used independently:
versatiles_core: Core types and utilities (coordinates, formats, traversal)versatiles_container: Tile container I/O (read, write, convert)versatiles_geometry: Geometric data structures (GeoJSON, MVT)versatiles_image: Image processing (PNG, JPEG, WEBP, AVIF)versatiles_pipeline: Tile processing pipelines (VPL language)versatiles_derive: Procedural macros (internal use).versatiles - Native VersaTiles container format.mbtiles - MBTiles (SQLite-based).pmtiles - PMTiles (cloud-optimized).tar - TAR archivesMIT License - see LICENSE for details.