Embed Ferret in Go
Use the native Go library when your application needs full control over Ferret’s engine, modules, host values, codecs, sandboxed services, and execution lifecycle.
Start with a minimal query, then move into the API area that matches your integration.
First steps
Getting Started
Install the library, run your first query from Go, and handle the result.
Execution
Executing Ferret
Use the Go Engine, Plan, and Session lifecycle.
Input data
Parameters
Pass Go values into queries at engine and session level.
Host functions
Custom Functions
Register Go functions and namespaces that scripts can call.
Runtime setup
Runtime Configuration
Control the standard library, logging, encoding, concurrency, and file system access.
Go types
Host Values
Implement Go types that FQL scripts can hold, access, iterate, query, and dispatch to.
Runtime modules
Modules
Install, configure, register, and manage modules in an embedded runtime.
Encoding
Value Encoders
Understand how output values are encoded and implement custom codecs.
Artifacts
Programs
Compile queries to binary artifacts, load pre-compiled programs, and work with the artifact format.
Developer tooling
Compiler Analysis
Inspect resolved symbols, references, calls, diagnostics, and type facts without running a query.
Guide
Build a Go service
Initialize the engine, compile queries, and run them in an HTTP service.