š¦ 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, processing persistent identifiers through their lifecycle, and generating artifacts.
AI And Agent APIs
The library also provides building blocks for optional AI-enabled applications:
acorn::schema::agentmodels language models, providers, benchmark harnesses, prompt files, and agent-oriented OpenCode configuration.- Embedded prompt templates support summarization, translation, teaching, claim extraction, and gap finding.
acorn::io::api::openaiprovides a client for completions, chat completions, responses, embeddings, model discovery, and related operations using supported OpenAI-style HTTP endpoints and JSON formats. It can call OpenAIās service or another compatible server, including a local one such as llama-swap; āOpenAI-compatibleā describes the connection format, not the model provider.
These APIs complement ACORNās deterministic schema and artifact workflows; applications decide when and how a model is invoked.
Important
When ACORN validates a PID, it does not rely only on recognition patterns. It also validates parsed structure and, for ISBNs1, ISNIs2, ORCIDs3, and RORs4, the check digits implemented for that identifier. Validation is local and does not confirm registration with an external authority.
The PID regression tests maintain shared test-vector parity with Metadata Tools for arXiv, DOI, ISBN, ISNI, ORCID, RAiD, and ROR, and with idutils for ARK, arXiv, DOI, Handle, ISBN, ISNI, ORCID, RAiD, ROR, and SWHID. This parity applies to the listed overlapping cases, not every behavior or identifier family supported by those projects.
Installation
-
Add
acorn-libas a dependency5cargo add acorn-lib -
Use
acorn-libfunctions in your Rust code#![allow(unused)] fn main() { use acorn::schema::validate::{is_ark, is_arxiv, is_doi, is_isni, is_orcid, is_ror}; assert!(is_ark("ark:/1234/w5678").is_ok()); assert!(is_arxiv("arXiv:2106.09685").is_ok()); assert!(is_doi("10.11578/dc.20250604.1").is_ok()); assert!(is_isni("https://isni.org/isni/0000000492299539").is_ok()); assert!(is_orcid("https://orcid.org/0000-0002-2057-9115").is_ok()); assert!(is_ror("01qz5mb56").is_ok()); } -
If you want to use the full capability of
acorn-libto build your own CLI app, be sure to enable thedoctorandpowerpointfeatures6cargo add acorn-lib --features doctor,powerpoint