Skip to content

Library (crates)

banshee is a workspace of focused crates, all published on crates.io.

CratePurpose
banshee_lexerTokenizer
banshee_parserRecovering parser → lossless CST
banshee_syntaxSyntax kinds, AST, Parse container
banshee_hirName resolution, scopes, lint rules
banshee_completionCompletion engine and provider traits
banshee_formatFormatter (two engines) and edit diffing
banshee_configbanshee.toml schema (serde)
banshee_schemaSchema snapshot, .banshee/ cache, live introspection
banshee_lspLanguage server
bansheeFacade crate and CLI
let parse = banshee_parser::parse("SELECT id, name FROM users");
assert!(parse.errors().is_empty());
let formatted = banshee_format::format_sqlstyle("select id,name from users");
println!("{formatted}");

banshee is built to be driven by other tools without a fork. banshee_hir exposes a committed extension contract:

  • SchemaProvider — supply schema (tables, columns, JSONB shape) from any source, e.g. a FHIR StructureDefinition instead of live introspection.
  • LintRulePack — add domain-specific lint rules.
  • AnalysisOptions / BuiltinLintPack — select built-in packs and inject external packs via external_lint_packs.
  • analyze_query_with_options — the entry point that takes both.

banshee_completion likewise exposes its SchemaProvider / FunctionProvider traits. These will not change incompatibly within a minor version.

Pre-1.0: the public API may change between minor versions. The intended surface is what each crate re-exports from its lib.rs, plus the extension contract above.