Registry / utility / liquid-derive

liquid-derive

JSON →
library0.26.10rscratesunverified

The liquid templating language for Rust, providing derive macros for template rendering.

# Cargo.toml [dependencies] liquid-derive = "0.26.10"
INSTALL
IMPORT
SIG · LIQUID-DERIVE
L
liquid-derive
utilityrustv0.26.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Object
use liquid::Object;

Renders a Liquid template with a variable.

use liquid::Object; fn main() { let template = liquid::ParserBuilder::with_stdlib() .build() .unwrap() .parse("Hello {{ name }}!") .unwrap(); let mut globals = Object::new(); globals.insert("name".into(), liquid::to_value("World").unwrap()); let output = template.render(&globals).unwrap(); println!("{}", output); }
Debug
Known issues
gotchaRequires the `derive` feature for derive macros
fix
Add `features = ["derive"]` to your Cargo.toml dependency
affects: >=0.26.0
Upgrade
Version history
0.26.10latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
liquid-derive — cargo add liquid-derive · libregistry