Advanced: Brick Runtime
Last updated
Was this helpful?
Last updated
Was this helpful?
The Brick Runtime controls how PixieBrix executes bricks, including: passing information between bricks, error handling, and logging.
Whenever we introduce a non-backward compatible change to the runtime, we increment the brick runtime apiVersion
field, e.g., v1
, v2
, v3
.
We maintain support for bricks written with old versions of the runtime. Bricks built with different versions of the runtime can be used together.
When using YAML-based configuration, the runtime is controlled via the apiVersion
directive:
For backward compatibility, apiVersion defaults to v1
.
Runtime v3 introduces the following backward-incompatible changes:
Support for field-level templates/expressions: !var
, !nunjucks
, !mustache
A !pipeline
and !defer
expression boundaries (for use in the Document Builder)
Drops support for the brick-level templateEngine
directive (the directive is ignored)
Templates are no longer auto-escaped (because HTML is sanitized prior to rendering). To escape a template:
Nunjucks: use the
Support for the Handlebars template engine has been dropped
Page Editor changes:
Nunjucks replaces Mustache as the default template engine
Each field has a toggle to control how to pass data to
Page Editor: When you open a mod written with v2 in the Page Editor, the Page Editor will attempt to convert it automatically to a v3 mod. When you save the mod, the Page Editor will save the mod as a v3 mod.
Workshop:
Update the API version directive for the brick: apiVersion: v3
Update each template and variable expression to use !var
, !mustache
, or !nunjucks
To migrate an mod from v1 to v3, you must use the workshop
Runtime v2 introduces the following backward-incompatible changes:
Bricks must reference data by @input
or @outputKey
. Data no longer flows implicitly from one brick to the next
Enhancements:
Mods now support a definitions
section that can contain inline starter brick and reader definitions
If you’d like assistance migrating your mods from v2 to v3, we’d love to help! Contact us at