3 unstable releases

0.2.0 Dec 25, 2024
0.1.1 Jul 14, 2023
0.1.0 Jul 11, 2023

#666 in Web programming

Download history 12/week @ 2024-09-25 5/week @ 2024-10-02 1/week @ 2024-10-23 9/week @ 2024-10-30 4/week @ 2024-11-06 18/week @ 2024-11-13 4/week @ 2024-11-20 5/week @ 2024-12-04 14/week @ 2024-12-11 5/week @ 2024-12-18 174/week @ 2024-12-25 59/week @ 2025-01-01 7/week @ 2025-01-08

246 downloads per month

Apache-2.0

160KB
2.5K SLoC

Rust API client for Valhalla

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

These APIs are implemented:

Examples

use valhalla_client::Valhalla;
use valhalla_client::route::{Location, Manifest};
use valhalla_client::costing::{Costing};

let valhalla = Valhalla::default();

let manifest = Manifest::builder()
    .locations([Location::new(4.9041, 52.3676), Location::new(5.1214, 52.0907)])
    .costing(Costing::Bicycle(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();

Dependencies

~8–19MB
~264K SLoC