Skip to main content

Crate afterburner_core

Crate afterburner_core 

Source
Expand description

Afterburner core - engine trait, shared types, host-function API surface, and the script registry shell.

This crate deliberately has no runtime dependencies on Wasmtime or rquickjs. It defines the contract every backend implements.

Re-exports§

pub use engine::Combustor;
pub use error::AfterburnerError;
pub use error::Result;
pub use host::HostContext;
pub use host::HostFunction;
pub use host::HttpMethod;
pub use host::HttpResponse;
pub use host::LogLevel;
pub use host::NullHost;
pub use manifold::EnvAccess;
pub use manifold::FsAccess;
pub use manifold::ListenAccess;
pub use manifold::Manifold;
pub use manifold::NetAccess;
pub use registry::BurnCache;
pub use registry::BurnCacheBackend;
pub use registry::InProcessCacheBackend;
pub use registry::RegistryStats;
pub use registry::hex32;
pub use state_store::InMemoryStateStore;
pub use state_store::SharedStateStore;
pub use state_store::StateStore;
pub use types::EngineMode;
pub use types::FuelGauge;
pub use types::OutputValue;
pub use types::ScriptId;
pub use types::ScriptInvocation;
pub use types::ScriptOutcome;
pub use types::sha256;

Modules§

engine
The Combustor trait - where fuel (JS) meets air (data).
error
Errors produced by any Combustor implementation or the BurnCache.
host
Host function API surface exposed to JS scripts.
log
Level-gated logging on top of fastrace.
manifold
Manifold - capability gate controlling which Node.js-style built-in modules (and which parts of them) are available to a running script.
registry
BurnCache - content-addressed script cache sitting in front of any Combustor. Compiles each unique source exactly once; execute delegates to the engine’s thrust with per-call limits.
state_store
Cross-invocation key/value persistence - the StateStore trait.
types
Core value types shared by every Combustor implementation.

Macros§

ab_event
Emit a fastrace event into the current local parent span, gated on the configured log level.

Constants§

VERSION
This crate’s version, used by afterburner-afb to enforce a package’s [runtime] min requirement against the running engine.