The Bars Specification¶
Bars is a language-neutral template specification, in the tradition of Mustache, Handlebars.js, and Liquid. It defines a template language — interpolation, blocks, partials, and a transform pipeline — independent of any single implementation, so that workalikes in other languages can conform to a single normative document instead of reverse engineering one implementation's behavior.
kBars is the reference implementation, a Kotlin Multiplatform template processor that targets JVM, Android, iOS, Linux, JavaScript, and WebAssembly. This site is about the language itself; kBars' own site covers using that implementation.
Where to next¶
- Specification — the normative definition of the Bars language: lexical structure, data model, rendering rules, errors, and implementation-defined behavior.
- Porting — the language-agnostic conformance suite and how to build a workalike that conforms to it.
- Conformance suite distribution — versioned ZIP downloads of the fixtures, schemas, and specification, bundled together for a workalike to pin against.
Reference implementation¶
kBars is the Kotlin implementation this specification was extracted from, and the suite's canonical conformer. See kbars.commonsware.com for its usage guide, API reference, and CLI reference.
License¶
The Bars specification and conformance suite are licensed under the Apache License, Version 2.0.