Skip to main content

barbacane_compiler/
lib.rs

1//! Compiles OpenAPI/AsyncAPI specs into `.bca` (Barbacane Compiled Artifact).
2//!
3//! Validates specs, resolves extensions, builds routing trie,
4//! and produces a self-contained archive for the data plane.
5
6pub mod artifact;
7pub(crate) mod cache;
8pub(crate) mod download;
9pub mod error;
10pub mod manifest;
11pub mod spec_parser;
12
13pub use artifact::{
14    compile, compile_with_manifest, load_manifest, load_plugins, load_routes, load_specs,
15    BundledPlugin, CompileOptions, CompileResult, CompiledOperation, CompiledRoutes, LoadedPlugin,
16    Manifest, McpConfig, PluginBundle, PluginCapabilities, Provenance, SourceSpec,
17    ARTIFACT_VERSION, COMPILER_VERSION,
18};
19pub use error::{CompileError, CompileWarning};
20pub use manifest::{
21    extract_plugin_names, PathSource, PluginSource, ProjectManifest, ResolvedPlugin, UrlSource,
22};
23// Re-export spec-parser types for convenience
24pub use spec_parser::{
25    parse_spec, parse_spec_file, ApiSpec, AsyncAction, Channel, ContentSchema, DispatchConfig,
26    Message, MiddlewareConfig, Operation, Parameter, ParseError, RequestBody, ResponseContent,
27    SpecFormat,
28};