rdf2hdt

Crates.iordf2hdt
lib.rsrdf2hdt
version0.2.0
created_at2025-09-12 19:12:09.489447+00
updated_at2025-09-12 19:12:09.489447+00
descriptionLibrary for converting a RDF data to HDT
homepage
repositoryhttps://github.com/DeciSym/rdf2hdt
max_upload_size
id1836207
size26,259,261
Greg Hanson (GregHanson)

documentation

README

Latest Version Lint Build Documentation

rdf2hdt

Library for converting RDF data to HDT

This is a Rust-based tool that converts RDF data into HDT format. It uses the oxrdfio crate for RDF parsing and conversion, and then generates and saves the data as HDT. Implementation is based on the HDT specification and the output HDT is intended to be consumed by one of hdt crate, hdt-cpp, or hdt-java.

Installation

Install rdf2hdt with cargo:

cargo install rdf2hdt

Usage

The rdf2hdt CLI tool is used for generating HDT files from RDF input data.

$ rdf2hdt convert --help
Convert RDF to HDT.

The `convert` command parses RDF files, converts it to RDF triples using `oxrdfio` for parsing and conversion, and then generates and saves the data as HDT.

Usage: rdf2hdt convert [OPTIONS] --output <OUTPUT>

Options:
  -i, --input <INPUT>...
          Path to input RDF file(s).

          Provide the path to one or more RDF files that will be parsed and converted. Support file formats: https://crates.io/crates/oxrdfio

  -o, --output <OUTPUT>
          Path to output file.

          Specify the path to save the generated HDT.

  -v, --verbose...
          Increase logging verbosity

  -q, --quiet...
          Decrease logging verbosity

  -h, --help
          Print help (see a summary with '-h')

Using the build_hdt library

HDT files can be generated directly in Rust.

use rdf2hdt::hdt::buld_hdt;

let result = build_hdt(
  vec!["tests/resources/apple.ttl".to_string()],
  "output.hdt",
)?;

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Commit count: 19

cargo fmt