- Rename parseWithIncludes to parseTemplate for clarity
- Add resolveRelativePath to handle ../path and ./path relative to current file
- Paths without ./ or ../ prefix are relative to views_dir root (Pug convention)
- Fix duplicate include processing when extends loads parent with includes
- Add tests for relative path resolution
- All paths still validated against views_dir root (security unchanged)
- Add two benchmark modes: cached AST (render only) and no cache (parse+render)
- Shows parse overhead is 69.2% of total time (331ms out of 478ms)
- Fix use-after-free in ViewEngine.processIncludes by transferring child ownership
- Fix memory leaks by using ArenaAllocator pattern in test_includes
- Update test expectations to match actual template content (mixins, not partials)
- All tests pass
Benchmark results (2000 iterations):
- Cached (render only): 147.3ms
- No cache (parse+render): 478.3ms
- Parse overhead: 331.0ms (3.2x slower without caching)
- Add std.log.scoped(.pugz) to template.zig and view_engine.zig
- Log detailed error info (code, line, column, message) when parsing fails
- Log template path context in ViewEngine on parse errors
- Remove debug print from lexer, use proper scoped logging instead
- Move benchmarks, docs, examples, playground, tests out of src/ to project root
- Update build.zig and documentation paths accordingly
- Bump version to 0.3.1
- ViewEngine now supports extends and named blocks
- Each route gets exclusive cached AST (no shared parent layouts)
- Fix iteration over struct arrays in each loops
- Add demo app with full e-commerce layout using extends
- Serve static files from public folder
- Bump version to 0.3.0
Features:
- Fix string concatenation in attribute values (e.g., class="btn btn-" + type)
- Lexer now properly captures full expressions with operators
- Runtime evaluates expressions for class attributes
ViewEngine improvements:
- Change mixin loading from eager to lazy (on-demand)
- Mixins are now loaded from mixins directory only when first called
- Template-defined mixins take precedence over directory mixins
Benchmarks:
- Add src/benchmark.zig with three template complexity levels
- Simple: ~150k renders/sec, 6KB memory
- Medium: ~70k renders/sec, 45KB memory
- Complex: ~32k renders/sec, 94KB memory
- Memory leak detection confirms no leaks
Documentation:
- Update CLAUDE.md with lazy mixin loading details
- Document mixin resolution order