Skip to main content

nexcore_compound_registry/
lib.rs

1// Copyright © 2026 NexVigilant LLC. All Rights Reserved.
2// Intellectual Property of Matthew Alexander Campion, PharmD
3
4//! # nexcore-compound-registry
5//!
6//! Compound resolution library with PubChem/ChEMBL REST clients and
7//! local SQLite cache.
8//!
9//! ## Pipeline
10//!
11//! ```text
12//! resolve(name)
13//!   ├─ Layer 1: SQLite cache    (instant, no network)
14//!   ├─ Layer 2: PubChem API     (structure, identifiers)
15//!   └─ Layer 3: ChEMBL API      (bioactivity enrichment)
16//! ```
17//!
18//! ## Quick Start
19//!
20//! ```rust,no_run
21//! use nexcore_compound_registry::CacheStore;
22//!
23//! // Open in-memory cache (returns RegistryResult)
24//! let store = CacheStore::new_in_memory();
25//! assert!(store.is_ok());
26//! ```
27//!
28//! ## Tier: T3 (σ + → + π + μ + ∃)
29//! Sequence (σ) of causal (→) resolution steps that persist (π) mapped (μ)
30//! existing (∃) compounds.
31
32#![forbid(unsafe_code)]
33#![warn(missing_docs)]
34#![cfg_attr(
35    not(test),
36    deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
37)]
38
39pub mod cache;
40pub mod chembl;
41pub mod error;
42pub mod pubchem;
43pub mod resolver;
44pub mod types;
45
46// ── Convenience re-exports ───────────────────────────────────────────────────
47
48pub use cache::CacheStore;
49pub use error::{RegistryError, RegistryResult};
50pub use resolver::{resolve, resolve_batch};
51pub use types::{CompoundRecord, ResolutionSource};