schemaorg-validate 0.3.0

Parse and validate Schema.org structured data (JSON-LD, Microdata, RDFa) against the official vocabulary and Google Rich Results profiles.
Documentation
[package]
name = "schemaorg-validate"
version = "0.3.0"
edition = "2021"
rust-version = "1.86"

description = "Parse and validate Schema.org structured data (JSON-LD, Microdata, RDFa) against the official vocabulary and Google Rich Results profiles."

authors = ["Sinisa Mitrovic"]
license = "MIT"
repository = "https://github.com/mitrovicsinisaa/schemaorg-rs"
homepage = "https://github.com/mitrovicsinisaa/schemaorg-rs"
documentation = "https://docs.rs/schemaorg-validate"
readme = "README.md"

keywords = ["schema-org", "json-ld", "structured-data", "seo", "validation"]
categories = ["parsing", "web-programming", "encoding"]

exclude = [
    "tests/fixtures/*",
    ".github/*",
]

[lib]
name = "schemaorg_rs"
crate-type = ["cdylib", "rlib"]

[features]
default = ["extraction"]
extraction = ["dep:scraper", "dep:ego-tree", "dep:serde_json"]
validation = ["extraction"]
profiles = ["validation"]
wasm = ["profiles", "dep:wasm-bindgen", "dep:serde_json", "dep:getrandom", "dep:getrandom_02"]
cli = ["profiles", "dep:clap", "dep:ureq", "dep:serde_json"]
full = ["extraction", "validation", "profiles"]

[dependencies]
thiserror = "1"
serde = { version = "1", features = ["derive"] }

# HTML parsing (extraction feature only)
scraper = { version = "0.20", default-features = false, optional = true }
ego-tree = { version = "0.6", optional = true }

# JSON parsing (extraction feature only)
serde_json = { version = "1", optional = true }

# Insertion-ordered property maps
indexmap = { version = "2", features = ["serde"] }

# WASM support (optional)
wasm-bindgen = { version = "0.2", optional = true }
getrandom_02 = { package = "getrandom", version = "0.2", features = ["js"], optional = true }
getrandom = { version = "0.3", features = ["wasm_js"], optional = true }

# CLI (optional)
clap = { version = "4", features = ["derive"], optional = true }
ureq = { version = "2", optional = true }

[[bin]]
name = "schemaorg-validate"
path = "src/bin/validate.rs"
required-features = ["cli"]

[build-dependencies]
serde_json = "1"
serde = { version = "1", features = ["derive"] }

[dev-dependencies]
pretty_assertions = "1"
wasm-bindgen-test = "0.3"

[profile.release]
opt-level = 'z'     # optimize for size
lto = true           # link-time optimization
codegen-units = 1    # single codegen unit for better optimization
strip = true         # strip debug symbols
panic = 'abort'      # smaller binary, no unwinding

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.wasm-pack.profile.release]
wasm-opt = false