ferricel-core 0.2.1

Core compiler and runtime library for ferricel (CEL → Wasm)
//! ferricel-core: CEL to Wasm compiler and runtime
//!
//! This crate provides the core functionality for compiling Common Expression Language (CEL)
//! expressions into WebAssembly modules and executing them.
//!
//! User guide: <https://flavio.github.io/ferricel/>
//!
//! ## Capabilities
//!
//! - **Compiler**: Compiles CEL expressions to standalone Wasm modules
//! - **Runtime**: Executes Wasm modules with variable bindings
//! - **Type Support**: Handles integers, unsigned integers, doubles, strings, booleans, lists, and maps
//! - **Extensions**: Host-provided functions callable from CEL expressions
//!
//! ## Crate Features
//! - **`k8s-vap`** *(default)*: Compiles Kubernetes
//!   [`ValidatingAdmissionPolicy`](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionpolicy)
//!   YAML to Wasm
//!
//! ## Example
//!
//! ```rust
//! use ferricel_core::{compiler, runtime};
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Compile a CEL expression to Wasm
//! let wasm_bytes = compiler::Builder::new().build().compile("x + y")?;
//!
//! // Execute the Wasm module with variable bindings
//! let bindings = r#"{"x": 1, "y": 2}"#;
//! let result = runtime::Builder::new()
//!     .with_wasm(wasm_bytes)
//!     .build()?
//!     .eval(Some(bindings))?;
//! println!("Result: {}", result);
//! # Ok(())
//! # }
//! ```

#![cfg_attr(docsrs, feature(doc_cfg))]

pub mod compiler;
pub mod inspect;
pub mod runtime;
pub mod schema;

// Re-export commonly used types for convenience
pub use compiler::{Compiler, ExtensionKey, extensions_used};
pub use ferricel_types::extensions::UsedExtension;
pub use inspect::{ModuleInfo, ProducerField, ProducerValue, inspect};
pub use runtime::{Engine, EnginePre};
pub use schema::ProtoSchema;