dpp-digital-link
GS1 Digital Link URL parsing and building, and GS1 link-type content negotiation, for the Odal Node Digital Product Passport system.
Pure Rust, no I/O, no network calls. wasm32-unknown-unknown safe.
Scope note. This crate previously also carried AAS submodel mapping and a JSON-LD context. Those are now
dpp-aasanddpp-vcrespectively — a consumer that wants a GS1 parser no longer compiles an AAS mapper to get one.
When to use this crate
- You need to parse or build GS1 Digital Link URLs (GTIN, serial, batch).
- You are resolving DPP links and need to negotiate by link type, media type or requesting audience.
- You need GS1 check-digit validation, or a QR-ready canonical URL for a passport.
Example
use ;
use Disclosure;
// Parse a GS1 Digital Link URL
let link = parse.unwrap;
assert_eq!;
assert_eq!;
// Negotiate the best link for a JSON consumer
let descriptors = vec!;
let request = ResolutionRequest ;
let best = negotiate;
assert!;
A runnable version is in examples/parse_and_negotiate.rs.
Scope boundary
Syntax is not semantics. This crate proves a link is well-formed GS1; it does not prove the GTIN is allocated to you, nor that a resolver will find anything at the other end. Nothing here supports the phrase "GS1-certified".
Relationship to other crates
| Crate | Role |
|---|---|
dpp-domain |
Provides Audience and Disclosure — required by this crate |
dpp-aas |
The AAS projection that used to live here; no dependency in either direction |
Minimum Rust version
1.96 (MSRV is enforced in CI)
License
Apache-2.0 — see LICENSE