Skip to main content

cyrs/
lib.rs

1//! `cypher` — meta-crate re-exporting the full front-end library surface.
2//!
3//! Consumers that want "everything for parsing Cypher and turning it into
4//! a typed plan" depend on this crate. Consumers with tighter needs
5//! (parse-only, schema-only, etc.) depend on the specific member crate.
6//!
7//! Feature flags (spec 0001 §17.15):
8//! - `default`            — full library surface: core + fmt + schema
9//! - `lsp-only`           — library deps consumed by the LSP binary (core + fmt)
10//! - `fmt-only`           — formatter slice (core + fmt)
11//! - `schema-only`        — schema / type-system slice (core + schema)
12//! - `no-default-features` — empty; downstream picks slices explicitly
13//!
14//! Note: `cyrs-lsp` is a pure binary crate (no lib target), so it is
15//! not re-exported here. Use `cargo check -p cyrs-lsp` to verify the
16//! LSP binary compiles.
17//!
18//! Spec 0001 §3.1.
19
20#![forbid(unsafe_code)]
21#![doc(html_root_url = "https://docs.rs/cypher/0.0.1")]
22
23#[cfg(feature = "core")]
24pub use cyrs_ast as ast;
25#[cfg(feature = "core")]
26pub use cyrs_db as db;
27#[cfg(feature = "core")]
28pub use cyrs_diag as diag;
29#[cfg(feature = "core")]
30pub use cyrs_hir as hir;
31#[cfg(feature = "core")]
32pub use cyrs_plan as plan;
33#[cfg(feature = "core")]
34pub use cyrs_sema as sema;
35#[cfg(feature = "core")]
36pub use cyrs_syntax as syntax;
37
38#[cfg(feature = "fmt")]
39pub use cyrs_fmt as fmt;
40
41#[cfg(feature = "schema")]
42pub use cyrs_project as project;
43#[cfg(feature = "schema")]
44pub use cyrs_schema as schema;
45
46// ---------------------------------------------------------------------------
47// Convenience re-exports at the crate root.
48// ---------------------------------------------------------------------------
49
50#[cfg(feature = "core")]
51pub use cyrs_db::{
52    CypherDatabase, CypherDb, Database, DialectMode, FileId, ParseOutput, SourceFile,
53};
54#[cfg(feature = "core")]
55pub use cyrs_diag::{DiagCode, Diagnostic, Severity};
56#[cfg(feature = "core")]
57pub use cyrs_syntax::{Parse, SyntaxKind, parse};
58
59#[cfg(feature = "schema")]
60pub use cyrs_schema::{EmptySchema, SchemaProvider};