GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - vixcpp/template: Template rendering engine for Vix.cpp

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
benchmarks
benchmarks
 
 
cmake
cmake
 
 
docs
docs
 
 
examples
examples
 
 
include/vix/template
include/vix/template
 
 
src
src
 
 
templates
templates
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CMakePresets.json
CMakePresets.json
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
vix.json
vix.json
 
 

Repository files navigation

Vix Template Engine

X YouTube Stars Forks

Vix Template Engine is a minimal, deterministic and high-performance C++ template rendering engine built for real systems.

Designed for predictability, performance, and clarity.

Vix Logo

Simple. Deterministic. Fast.

The Vix template engine removes complexity found in traditional template systems.

No magic. No hidden state. Just a clean pipeline:

Loader → Lexer → Parser → AST → Template → Renderer

Example

Template

Hello {{ name }}
{% if user %}Welcome{% endif %}

C++

#include <vix/template/Engine.hpp>

using namespace vix::template_;

int main() {
  Engine engine;

  Context ctx;
  ctx.set("name", "Alice");
  ctx.set("user", true);

  auto result = engine.render_string(
    "Hello {{ name }} {% if user %}Welcome{% endif %}",
    ctx
  );

  std::cout << result.output;
}

Output

Hello Alice Welcome

Features (V1)

  • Variable interpolation
  • If conditions
  • For loops
  • HTML escaping (automatic)
  • AST-based rendering
  • Deterministic execution
  • Optional caching

Syntax

Variables

{{ name }}

Condition

{% if user %}
Hello
{% endif %}

Loop

{% for item in items %}
{{ item }}
{% endfor %}

Why Vix Template Engine

Deterministic

Same input → same output No hidden behavior

Minimal

Only essential features No over-engineering

Performance-first

  • AST reused across renders
  • no dynamic parsing at runtime
  • low allocations

C++ Native

No runtime dependency Full control over memory and performance


Build

cmake --preset dev-ninja
cmake --build --preset build-ninja

Run Examples

./build-ninja/template_basic_render
./build-ninja/template_loops_and_conditions

Benchmarks

./build-ninja/template_render_bench
./build-ninja/template_parse_bench
./build-ninja/template_cache_bench

Architecture

The engine is built on a clean separation of concerns:

  • Loader → source retrieval
  • Lexer → tokenization
  • Parser → AST creation
  • Template → compiled structure
  • Renderer → execution

This makes the system:

  • easy to understand
  • easy to extend
  • easy to optimize

Roadmap

Upcoming features:

  • Filters ({{ name | upper }})
  • Includes
  • Layout inheritance
  • Expression system
  • Compiler optimizations

Philosophy

The goal is not to be complex first.

The goal is to be:

  • correct
  • fast
  • extensible

Contributing

Contributions are welcome.

If you care about modern C++, performance, and real-world systems, this project is for you.


⭐ Star the project if you like the direction.

MIT License

About

Template rendering engine for Vix.cpp

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.