7 releases
Uses new Rust 2024
| 0.2.4 | Nov 28, 2025 |
|---|---|
| 0.2.3 | Nov 28, 2025 |
| 0.1.1 | Nov 19, 2025 |
#1115 in Web programming
74 downloads per month
Used in hrdf-routing-engine
60KB
1.5K
SLoC
OJP-RS
The ojp-rs crate is a Rust library for interacting with Open Journey Planner (OJP) services, a European
standard for distributed, multimodal journey planning (see https://opentransportdata.swiss/en/cookbook/open-journey-planner-ojp/).
Disclaimer
This crate is very early stage and used for testing purposes. It may or may not be extended in the future.
Features
- Build and send OJP-compliant requests:
- TripRequest: Plan journeys across multiple modes.
- LocationInformationRequest: Search for stops and places.
- Parse XML responses into Rust types.
- Support for OJP v2.0 schema.
- Extensible design for additional OJP services (e.g., FareRequest, TripInfoRequest, StopEventRequest).
- Async support for HTTP requests.
Use Cases
- Public transport apps
- Backend services for trip planning
- Research and analytics on multimodal transport
Installation
Add to your Cargo.toml:
cargo add ojp-rs
Configuration
- Requires an API key from opentransportdata.swiss.
- By default the environment variable that must be set is
TOKENwith the API key.
Example
An example can be run with:
cargo run --example find_journeys
Dependencies
~17–38MB
~484K SLoC