39 releases

0.1.117 Oct 5, 2025
0.1.87 Aug 28, 2025
0.1.79 Jun 29, 2025
0.1.60 Mar 11, 2025
0.0.3 Oct 30, 2023

#2442 in Database interfaces

Download history 341/week @ 2025-09-14 416/week @ 2025-09-21 121/week @ 2025-09-28 177/week @ 2025-10-05 11/week @ 2025-10-12 7/week @ 2025-10-19 2/week @ 2025-10-26

2,192 downloads per month
Used in 3 crates

MIT/Apache

1MB
32K SLoC

ShEx compact syntax

This module contains a compact syntax parser and serializer for ShEx.


lib.rs:

ShEx compact syntax parser

Example


use shex_ast::{Schema, Shape, ShapeExpr, ShapeExprLabel};
use shex_compact::ShExParser;

let str = r#"prefix : <http://example.org/>
             :S {}
            "#;

let schema = ShExParser::parse(str, None).unwrap();
let mut expected = Schema::new();
expected.add_prefix("", &IriS::new_unchecked("http://example.org/"));
expected.add_shape(
  ShapeExprLabel::iri_unchecked("http://example.org/S"),
  ShapeExpr::empty_shape(),
  false
);
assert_eq!(schema,expected)

Dependencies

~29–51MB
~714K SLoC