Skip to content

Expose a reusable Rust dataset and query API

Expose the dataset and query engine as a reusable Rust library, so applications can load and query a project without starting a server.

Acceptance criteria

  • Provide a documented public API to open a directory-backed dataset and execute SPARQL queries, with useful errors returned to the caller.
  • Share the existing source loading, catalog, query semantics, and query policy with the HTTP and MCP interfaces.
  • Support repeated queries against a loaded dataset. Define ownership, cleanup, and whether callers can request reloads or watching.
  • Do not terminate the host process on library errors.
  • Test SELECT, ASK, and graph queries, load errors, query errors, and parity with the existing interfaces.
  • Document a runnable Rust example and review the MkDocs documentation.

This API is a prerequisite for the Python integration in https://github.com/iolanta-tech/sparqld/issues/41.