Skip to main content

Crate bext_plugin_quickjs

Crate bext_plugin_quickjs 

Source
Expand description

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

Re-exports§

pub use runtime::QuickJsPluginConfig;
pub use runtime::QuickJsPluginRuntime;

Modules§

api
JS API surface exposed to QuickJS plugins.
runtime
QuickJS plugin runtime — loads and manages JS lifecycle plugins.