Build
The build command compiles FQL scripts into bytecode artifacts. Compiled artifacts skip the parsing and compilation steps at execution time.
Compile a script
ferret build script.fql
This produces script.fqlc alongside the source file.
Compile multiple scripts
ferret build script.fql utils.fql
Or use a glob:
ferret build *.fql
Each input file produces a corresponding .fqlc artifact in the same directory.
Custom output path
Use -o (or --output) to control where artifacts are written.
For a single input, the output can be a file or directory:
ferret build script.fql -o dist/script.fqlc
For multiple inputs, the output must be a directory:
ferret build *.fql -o dist/
The output directory is created automatically if it does not exist.
Run a compiled artifact
Pass the .fqlc file to ferret run:
ferret run script.fqlc
Compiled artifacts require the builtin runtime. They cannot be used with a remote runtime.
Inspect compiled output
Use ferret inspect to disassemble a compiled program and examine its bytecode, constants, and function definitions.