Skip to main content

afterburner_core/
lib.rs

1// SPDX-License-Identifier: BUSL-1.1
2// Copyright (c) 2026 vertexclique
3// Licensed under the Business Source License 1.1.
4// Change Date: 4 years after this version's release. Change License: Apache-2.0.
5
6#![doc(
7    html_logo_url = "https://raw.githubusercontent.com/vertexclique/afterburner/master/art/svg/afterburner-square.svg"
8)]
9//! Afterburner core - engine trait, shared types, host-function API surface,
10//! and the script registry shell.
11//!
12//! This crate deliberately has no runtime dependencies on Wasmtime or
13//! rquickjs. It defines the contract every backend implements.
14
15pub mod engine;
16pub mod error;
17pub mod host;
18pub mod log;
19pub mod manifold;
20pub mod registry;
21pub mod state_store;
22pub mod types;
23
24/// This crate's version, used by `afterburner-afb` to enforce a package's
25/// `[runtime] min` requirement against the running engine.
26pub const VERSION: &str = env!("CARGO_PKG_VERSION");
27
28pub use engine::Combustor;
29pub use error::{AfterburnerError, Result};
30pub use host::{HostContext, HostFunction, HttpMethod, HttpResponse, LogLevel, NullHost};
31pub use manifold::{EnvAccess, FsAccess, ListenAccess, Manifold, NetAccess};
32pub use registry::{BurnCache, BurnCacheBackend, InProcessCacheBackend, RegistryStats, hex32};
33pub use state_store::{InMemoryStateStore, SharedStateStore, StateStore};
34pub use types::{
35    EngineMode, FuelGauge, OutputValue, ScriptId, ScriptInvocation, ScriptOutcome, sha256,
36};