File size: 863 Bytes
3374e90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! bex-js: QuickJS worker pool for the Bex Engine v6.
//!
//! Architecture: Worker-Thread Pool Model
//! - Dedicated std::thread workers (NOT tokio spawn_blocking)
//! - Per-plugin JSContext isolation
//! - Affinity routing (same plugin -> same worker)
//! - crossbeam-channel work queue with non-blocking dispatch
//! - rquickjs 0.11 bindings
//!
//! Security: 7 layers
//! 1. No dangerous globals (delete WebAssembly, etc.)
//! 2. Memory limits per context
//! 3. Timeout interrupt via rquickjs interrupt handler
//! 4. Per-plugin context isolation
//! 5. Manifest permission gate (allow_js)
//! 6. Input injection via globals (no eval of user data)
//! 7. args_json passed as string (no JS injection)

pub mod config;
pub mod error;
pub mod pool;
pub mod polyfills;
pub mod worker;

pub use config::JsPoolConfig;
pub use error::JsError;
pub use pool::JsPool;