Skip to main content

ridl_core/
lib.rs

1//! The RIDL family compiler core: the salsa incremental database, the queries
2//! built on the syntax layer (docs/ROADMAP.md epic E0, ADR-0004 §3), the
3//! coded [`Diagnostic`] model every pass emits (E1.10,
4//! ADR-0004 §5), and the ns core — manifest, package model, and filesystem
5//! discovery (E1.3, E1.5, ADR-0002). The resolver and checker moved to
6//! `ridl-sem` (ADR-0007 decision 4).
7//!
8//! Filesystem discovery ([`workspace`]) and the lockfile ([`lock`]) sit behind
9//! the default-on `fs` feature; remote fetch and the cache ([`fetch`](mod@fetch),
10//! [`cache`]) sit behind the default-on `fetch` feature, which implies `fs`
11//! (ADR-0007 decision 5). With `--no-default-features` the crate builds for
12//! `wasm32-unknown-unknown`.
13
14#[cfg(feature = "fetch")]
15pub mod cache;
16pub mod db;
17pub mod diag;
18#[cfg(feature = "fetch")]
19pub mod fetch;
20pub mod interface_lock;
21#[cfg(feature = "fs")]
22pub mod lock;
23pub mod manifest;
24pub mod package;
25pub mod std_lib;
26#[cfg(feature = "fs")]
27pub mod workspace;
28
29#[cfg(feature = "fetch")]
30pub use cache::Cache;
31pub use db::{InputFile, RidlDatabase, parse_file, profile_of_path};
32pub use diag::{
33    DiagCode, Diagnostic, FileId, FixIt, Label, Severity, SourceMap, Span, house_style_message,
34    render,
35};
36#[cfg(feature = "fetch")]
37pub use fetch::{FetchError, Frozen, fetch, materialize_imports};
38#[cfg(feature = "fs")]
39pub use lock::{LockEntry, Lockfile, read_lockfile, write_lockfile};
40pub use manifest::{Manifest, ManifestKind, parse_manifest};
41pub use package::{
42    CatalogEntry, Package, PackageOrigin, ServiceCatalog, Workspace, package_of, service_catalog,
43};
44pub use std_lib::std_package;
45#[cfg(feature = "fs")]
46pub use workspace::{LoadedWorkspace, find_manifest_root, load_workspace};