Expand description
oai-pmh-rs is a robust, spec-compliant implementation of the
OAI-PMH 2.0
(Open Archives Initiative Protocol for Metadata Harvesting) for Rust.
§Overview
This crate provides a reusable, transport-agnostic protocol engine that handles request validation, verb dispatch, error handling, and XML response generation according to the OAI-PMH specification.
It is designed to be embedded into repository services, allowing you to implement your own data layer while delegating all protocol behaviour to this crate.
§Architecture
The crate is split into two main layers:
-
core— transport-agnostic protocol logic, including:- verb handling (
Identify,ListRecords, etc.) - request validation and error handling
- resumption token handling
- XML response generation
core::OaiProvidertrait for repository integration
- verb handling (
-
[
transport::actix] (feature-gated) — HTTP integration for Actix Web applications, providing ready-to-use handlers.
§Usage
Typical usage:
- Implement
core::OaiProviderfor your repository or data source - Convert incoming HTTP parameters into a key-value map
- Call
core::handle_oai_requestto produce an OAI-PMH XML response - Return the response via your web framework (or use the Actix integration)
§Design Goals
- Strict adherence to the OAI-PMH 2.0 specification
- Clear separation between protocol logic and data access
- Minimal assumptions about storage or transport layers
- Composability across different services and applications
Modules§
- core
- Transport-agnostic OAI-PMH core engine.