Embed Ferret in JavaScript
@montferret/ferret exposes Ferret to Node.js and modern browsers. It loads the Ferret runtime as WebAssembly and provides JavaScript interfaces for direct execution, reusable plans, parameters, cancellation, host-defined functions, and JavaScript modules with asynchronous lifecycle hooks.
First steps
Getting Started
Install the package, initialize WASM, and run an FQL program.
Execution
Executing Ferret
Run programs directly or reuse plans and sessions.
Input data
Parameters
Pass JavaScript values into FQL and understand conversion rules.
Host functions
Custom Functions
Register synchronous and asynchronous JavaScript functions.
Runtime modules
Modules and Lifecycle
Group JavaScript functions with asynchronous engine, plan, and session hooks.
Runtime boundaries
Runtime and WASM Limitations
Understand loading, networking, and currently unexposed integrations.