Skip to main content

vane_core/
lib.rs

1//! Foundation types, traits, `FlowGraph` IR, and compilation pipeline for vane.
2//!
3//! See `spec/crates/core.md`, `spec/flow-model.md`, `spec/crates/engine.md`.
4
5pub mod body;
6pub use body::*;
7pub mod canonical;
8pub mod compile;
9pub use compile::compile;
10pub mod config;
11pub use config::{Env, EnvReader, LoadedConfig, ProcessEnv, load, scan_rules_dir};
12pub mod conn_context;
13pub use conn_context::*;
14pub mod error;
15pub use error::*;
16pub mod fetch;
17pub use fetch::*;
18pub mod flow_ctx;
19pub use flow_ctx::*;
20pub mod flow_log;
21pub use flow_log::*;
22pub mod ir;
23pub use ir::*;
24pub mod l4;
25pub use l4::*;
26pub mod metadata;
27pub use metadata::*;
28pub mod middleware;
29pub use middleware::*;
30pub mod wasm_runtime;
31pub use wasm_runtime::*;
32pub mod phase;
33pub mod predicate;
34pub use guess::{DetectedProtocol, MAX_PEEK_BYTES, PeekResult, TlsClientHello};
35pub use predicate::*;
36pub mod preset;
37pub use preset::{PresetInvocation, RuleEntry, expand_invocation};
38pub mod rule;
39
40pub mod meta {
41	pub const DESCRIPTION: &str = "A compact programmable proxy engine";
42	pub const COPYRIGHT: &str = "Copyright (C) 2025 Canmi <t@canmi.icu>";
43	pub const HOMEPAGE: &str = "https://vane.canmi.app";
44	pub const REPOSITORY: &str = "https://github.com/canmi21/vane";
45	pub const LICENSE: &str = "MIT";
46	pub const LICENSE_URL: &str = "https://opensource.org/licenses/MIT";
47}
48
49pub mod version {
50	/// Compile-time and runtime information about a vane binary.
51	///
52	/// Pure data — no presentation deps. Each binary fills this in
53	/// from its own `build.rs`-emitted env vars and
54	/// `cfg!(feature = ...)` introspection, then hands it to the
55	/// `vane-banner` crate for printing. See `spec/crates/daemon.md`
56	/// § _Crypto provider_ and the per-binary `build.rs` files for
57	/// the full contract.
58	pub struct BuildInfo {
59		pub version: &'static str,
60		pub commit: &'static str,
61		pub build_date: &'static str,
62		pub rustc: &'static str,
63		pub cargo: &'static str,
64		pub features: &'static [&'static str],
65		pub protocols: &'static [&'static str],
66	}
67}