Cargo Features

[dependencies]
tera = { version = "1.19.1", default-features = false, features = ["builtins", "urlencode", "preserve_order", "date-locale"] }
default = builtins

The builtins feature is set by default whenever tera is added without default-features = false somewhere in the dependency tree.

builtins default date-locale? = chrono, chrono-tz, humansize, rand, slug, urlencode

Affects common::date, number::filesizeformat, string::slugify, functions::now, functions::get_random

urlencode builtins = percent-encoding

Affects string::urlencode, string::urlencode_strict

preserve_order

Enables preserve_order of serde_json

serde_json:

Make serde_json::Map use a representation which maintains insertion order.
This allows data to be read into a Value and written back to a JSON string while preserving the order of map keys in the input.

date-locale = builtins

Enables unstable-locales of chrono

used in date format filter

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

slug builtins

Enables slug

used in slugify filter

percent-encoding urlencode?

Enables percent-encoding

used in urlencode filter

humansize builtins

Enables humansize

used in filesizeformat filter

chrono builtins date-locale?
chrono-tz builtins

Enables chrono-tz ^0.8

used in date format filter

rand builtins

Enables rand

used in get_random function