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 (ADR-0004 §3), the
3//! coded [`Diagnostic`] model every pass emits
4//! (ADR-0004 §5), and the ns core — manifest, package model, and filesystem
5//! discovery (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;
21pub mod lint;
22#[cfg(feature = "fs")]
23pub mod lock;
24pub mod manifest;
25pub mod package;
26pub mod std_lib;
27#[cfg(feature = "fs")]
28pub mod workspace;
29
30#[cfg(feature = "fetch")]
31pub use cache::Cache;
32pub use db::{InputFile, RidlDatabase, parse_file, profile_of_path};
33pub use diag::{
34    DiagCode, Diagnostic, FileId, FixIt, Label, Severity, SourceMap, Span, house_style_message,
35    render,
36};
37#[cfg(feature = "fetch")]
38pub use fetch::{FetchError, Frozen, fetch, materialize_imports};
39#[cfg(feature = "fs")]
40pub use lock::{LockEntry, Lockfile, read_lockfile, write_lockfile};
41pub use manifest::{Manifest, ManifestKind, TimingDefaults, parse_manifest};
42pub use package::{
43    CatalogEntry, Package, PackageOrigin, ServiceCatalog, Workspace, package_of, service_catalog,
44};
45pub use std_lib::std_package;
46#[cfg(feature = "fs")]
47pub use workspace::{
48    LoadError, LoadedWorkspace, Overlay, find_root, load_workspace, load_workspace_with,
49};