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 catalog_history;
17pub mod db;
18pub mod diag;
19#[cfg(feature = "fetch")]
20pub mod fetch;
21pub mod interface_lock;
22pub mod lint;
23#[cfg(feature = "fs")]
24pub mod lock;
25pub mod manifest;
26pub mod package;
27pub mod std_lib;
28#[cfg(feature = "fs")]
29pub mod workspace;
30
31#[cfg(feature = "fetch")]
32pub use cache::Cache;
33pub use db::{InputFile, RidlDatabase, parse_file, profile_of_path};
34pub use diag::{
35    DiagCode, Diagnostic, FileId, FixIt, Label, Severity, SourceMap, Span, house_style_message,
36    render,
37};
38#[cfg(feature = "fetch")]
39pub use fetch::{FetchError, Frozen, fetch, materialize_imports};
40#[cfg(feature = "fs")]
41pub use lock::{LockEntry, Lockfile, read_lockfile, write_lockfile};
42pub use manifest::{Manifest, ManifestKind, TimingDefaults, parse_manifest};
43pub use package::{
44    CatalogEntry, Package, PackageOrigin, ServiceCatalog, Workspace, package_of, service_catalog,
45};
46pub use std_lib::std_package;
47#[cfg(feature = "fs")]
48pub use workspace::{
49    LoadError, LoadedWorkspace, Overlay, find_root, load_workspace, load_workspace_with,
50};