Skip to main content

cairn_core/
lib.rs

1//! Cairn core.
2//!
3//! Owns the model. Every other crate in the workspace is a thin front end over
4//! this one and never re-implements or bypasses checking (see `docs/design.md`
5//! Section 7). v0.1 build step 1 — the content-addressed AST store — lives in
6//! [`node`] and [`store`]. Later steps add the checker, renderer, and WASM
7//! lowering on top of this.
8
9pub mod check;
10pub mod edit;
11pub mod json;
12pub mod live;
13pub mod node;
14pub mod render;
15pub mod scaffold;
16pub mod stdlib;
17pub mod store;
18pub mod ty;
19pub mod wasm;
20pub mod web;
21
22pub use check::{Checker, Failures, Report, Status, Violation};
23pub use edit::{
24    EditError, Editor, ExprSpec, FunctionSpec, HoleInfo, ModuleSpec, SignatureInfo, StepSpec,
25    TypeDefSpec,
26};
27pub use node::{BinOp, MatchArm, Node, NodeHash, Param, Produces};
28pub use render::{node_at, render, render_addressed, Addressed, Span};
29pub use scaffold::{AppSpec, EntitySpec, FieldKind, FieldSpec};
30pub use store::{Materialized, Store, FORMAT_VERSION};
31pub use live::{serve_http_live, LiveHub};
32pub use ty::{Confidence, Effect, Type};
33pub use wasm::{
34    drain_published, drain_resp_headers, lower, run_effectful_i64, run_fallible, run_i64,
35    serve_http, serve_http_db, serve_once, serve_request, serve_request_db, serve_request_db_h,
36    serve_request_h, HttpResponse, LowerError, RunError,
37};
38
39/// Crate marker. Kept so the front-end crates have a stable symbol to depend on
40/// until they call real `core` API.
41pub const CRATE: &str = "cairn-core";