🦀 Rust crate
The ACORN CLI application is built on top of the acorn-lib Rust crate. The acorn-lib library provides core functionalities for working with ACORN schemas, validating persistent identifiers1, and generating artifacts.
Important
When ACORN validates a PID, it does not just use regular expressions, but also includes checksum validation when part of the associated PID specification. ARKs2, ISBNs3, ORCiDs4, and RORs5 all include some form of checksum, and
acorn-libvalidates these as well to ensure the PID is not only well-formed but also valid according to its specification.
Installation
-
Add
acorn-libas a dependency6cargo add acorn-lib -
Use
acorn-libfunctions in your Rust code#![allow(unused)] fn main() { use acorn::schema::validate::{is_ark, is_doi, is_orcid, is_ror}; assert!(is_ark("ark:/1234/w5678")); assert!(is_doi("10.11578/dc.20250604.1")); assert!(is_orcid("https://orcid.org/0000-0002-2057-9115")); assert!(is_ror("01qz5mb56")); } -
If you want to use the full capability of
acorn-libto build your own CLI app, be sure to enable thedoctorandpowerpointfeatures7cargo add acorn-lib --features doctor,powerpoint