7 releases (4 breaking)

0.5.0 Dec 13, 2025
0.4.1 May 5, 2025
0.4.0 Mar 15, 2025
0.3.0 Feb 16, 2025
0.1.1 Jul 14, 2023

#66 in Geospatial

Download history 40/week @ 2025-11-23 24/week @ 2025-11-30 135/week @ 2025-12-07 87/week @ 2025-12-14 26/week @ 2025-12-21 25/week @ 2025-12-28 258/week @ 2026-01-04 1081/week @ 2026-01-11 752/week @ 2026-01-18 985/week @ 2026-01-25 1281/week @ 2026-02-01 827/week @ 2026-02-08 892/week @ 2026-02-15 693/week @ 2026-02-22 336/week @ 2026-03-01 426/week @ 2026-03-08

2,356 downloads per month

Apache-2.0

235KB
3.5K SLoC

Rust API client for Valhalla

This crate contains the types and functions for interacting with the Valhalla API.

These APIs are implemented:

Features and usage

We provide two clients:

The second one is behind the (default-enabled) blocking feature, so if you don't need it, you can disable it via default-features = false.

We also offer the (default-enabled) gpx feature. This enables reading and writing GPX (GPS Exchange Format) files for APIs where we have the needed context.

Example

// an async version is available at valhalla_client::Valhalla
use valhalla_client::blocking::Valhalla;
use valhalla_client::route::{Location, Manifest};
use valhalla_client::costing::{Costing};

let valhalla = Valhalla::default();

let amsterdam = Location::new(4.9041, 52.3676);
let utrecht = Location::new(5.1214, 52.0907);
let manifest = Manifest::builder()
    .locations([amsterdam, utrecht])
    .costing(Costing::Motorcycle(Default::default()));

let response = valhalla.route(manifest).unwrap();

println!("{:#?}", response);

// If the gpx feature is enabled, you can convert the response to a gpx::Gpx object
// let gpx = response.trip.into();

For further examples, please see the different clients:

Dependencies

~8–16MB
~272K SLoC