Skip to content

v0.8.0

Choose a tag to compare

@flipbit03 flipbit03 released this 12 Oct 23:23
· 6 commits to main since this release
ced9d57

Upgrading from 0.7.x

  • No protocol change. Rebuild as usual.
  • New dependency: rustible-sdk and rustible-macros depend on minijinja pinned to exactly =3.0.0 (its syntax-tree API is unstable). A workspace that needs a different minijinja 3.x does not resolve.
  • template! is in the prelude. A playbook that defines its own item named template may need to rename it or import it explicitly.
  • More masking: a Secret is now also masked in the HTML-safe JSON, percent-encoded and HTML-escaped spellings, from every op.

Highlights

  • rustible::template!: Jinja2 templates (minijinja) rendered to a String on the target, for any op.
    • Sources: a literal, include_str!("x.j2"), or text known at run time.
    • Variables: name = value (any Serialize) and a ..spread.
    • Compile-time checks for a literal or include_str! template:
      • the syntax of every file in the tree;
      • every include/extends/import target exists, resolved relative to the file that names it, and is embedded, so cargo rebuilds when it changes;
      • every name passed is used, and every top-level name the template reads is passed.
    • On the target: strict undefined, trim_blocks, final newlines kept, no autoescape, every minijinja built-in. A template whose text arrives at run time can read no file.
    • See USING §13 and template!'s rustdoc.
  • rustible::json! and rustible::serde are re-exported, for ad hoc and typed template data.

What's Changed

  • Templates: rustible::template! (Jinja2 rendering to a String), and vision §5.7 by @flipbit03 in #148

Full Changelog: v0.7.0...v0.8.0