0d73796900704d2ed3e52f10875bf2c685ecc6c7
🗺️ Rust Vector Map
A high-performance, GPU-accelerated vector map renderer built with Rust, WebAssembly, and ScyllaDB.
🚀 Features
- GPU Rendering: Uses
wgputo render millions of vertices (buildings, roads, parks) directly on the GPU. - WebAssembly: Core logic runs in Wasm for near-native performance in the browser.
- Scalable Backend: Powered by ScyllaDB to handle massive OpenStreetMap datasets with low latency.
- Custom Vector Tiles: Efficient binary format for fast network transfer and parsing.
- Interactive: Smooth zooming, panning, and dynamic level-of-detail.
🏗️ Architecture
- Frontend: Rust (
winit,wgpu,wasm-bindgen) compiled to WebAssembly. - Backend: Rust (
Axum) REST API serving tile data. - Database: ScyllaDB (Cassandra-compatible) storing processed OSM data.
- Importer: Custom Rust tool (
osmpbf) to ingest.osm.pbffiles.
🛠️ Getting Started
Prerequisites
1. Start the Database
Start ScyllaDB in a container:
docker compose up -d scylla
2. Import Data
- Download an OpenStreetMap PBF file (e.g., from Geofabrik).
- Save it as
sample.osm.pbfin the project root. - Run the importer:
cargo run --bin importer
Note: This process may take a few minutes depending on the size of the PBF file.
3. Run the Application
Option A: Docker (Recommended)
Build and run the entire stack:
docker compose up --build
Option B: Manual (Development)
-
Build Frontend:
cd frontend wasm-pack build --target web --out-name wasm --out-dir ../backend/static cd .. -
Run Backend:
cargo run --bin backend
4. View the Map
Open your browser and navigate to:
http://localhost:3000
📂 Project Structure
/backend: Axum server and database logic./frontend: Rust Wasm application and rendering engine./importer: Tool for parsing and ingesting OSM data.docker-compose.yml: Service orchestration.
📜 License
MIT License
Description
Languages
Rust
84.9%
HTML
14.4%
Dockerfile
0.5%
Makefile
0.1%