bext-plugin-quickjs 0.2.0

QuickJS sandbox for bext — lightweight JavaScript plugin execution
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! bext-plugin-quickjs: QuickJS-based sandbox for lightweight JS plugin execution.
//!
//! Embeds QuickJS via `rquickjs` to run tenant-supplied JavaScript in a secure,
//! memory-limited, time-limited sandbox. Ideal for business logic scripts:
//! pricing rules, data transforms, webhook handlers.
//!
//! The JS runtime exposes a controlled API surface:
//! - `console.log/warn/error/info/debug` — structured logging
//! - `bext.storage.get/set/delete` — per-plugin scoped storage
//! - `bext.fetch(url, options)` — rate-limited, URL-allowlisted HTTP
//! - `bext.config` — plugin configuration object
//! - `bext.metric(name, value, tags)` — metric emission

pub mod api;
pub mod runtime;

pub use runtime::{QuickJsPluginConfig, QuickJsPluginRuntime};