docs.rs failed to build osrm-binding-0.1.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
osrm-binding
Rust bindings for OSRM (Open Source Routing Machine), providing an idiomatic and type-safe interface to access OSRM core functionalities (route, table, trip) from Rust.
π Features
- πΊοΈ Calculate routes, trips, and distance/duration tables using OSRM
- π¦ Fully written in Rust
- π‘ Simple and safe API for high-performance routing
- π§ͺ Includes integration tests for route and table APIs
π¦ Installation
π οΈ Usage
Initialization
let engine = new
.expect;
Route Calculation
let request = default
.points
.build
.unwrap;
let result = engine.route.unwrap;
println!;
Table (Distance/Duration Matrix)
let request = TableRequest ;
let response = engine.table.unwrap;
println!;
Simple Route
let result = engine.simple_route.unwrap;
println!;
Trip API
let request = TripRequest ;
let trip = engine.trip.unwrap;
println!;
π¬ Tests
To run the tests:
export OSRM_TEST_DATA_PATH="/absolute/path/to/france-latest.osrm"
cargo test
Make sure your .osrm file is correctly prepared using osrm-extract and osrm-contract.
π License
MIT
Note: This library assumes the user has a working
osrm-c-apicompiled and accessible. You must generate.osrmfiles yourself usingosrm-extractandosrm-contract.
β¨ Contribution
Feel free to open issues or PRs if you want to improve performance, add more OSRM API bindings, or enhance usability.
Made with β€οΈ in Rust.