🔗Changelog
All notable changes to Tim Engine are documented here. The changelog is managed with changer in the tim repository.
🔗v0.2.6 — 2026-07-27
🔗New features
input:TYPEshorthand —input:time,input:color,input:range, etc. are parsed as<input type="TYPE">at the lexer/parser level. Distinguished from Tim's:text-content syntax by checkingwsno == 0(no whitespace before the colon). Only triggers oninputtags; subsequent attributes (.class,#id) still apply.svgelements now auto-injectxmlns="http://www.w3.org/2000/svg"at parse time, unless you explicitly providexmlns.@LitElement, ClassName— define Lit-style custom HTML elements in Tim. The tag name is derived from the class name (kebab-case). The body supports@javascriptblocks (concatenated into the class body) and a single@clientblock (the render template compiled to JS template literals). Generates a JavaScript class extendingLitElementwithconnectedCallback,render(), andcustomElements.define(). Client-side only; server-side rendering emits the class as a<script>block.
🔗Fixes
- PHP Linux build — replaced
--passC: staticExec(...)withswitch("passC", ...)intim.nims; usesphp-config --include-diras primary header discovery on Linux (with pkg-config fallback). - Clue hardcoded macOS pragmas — wrapped
{.passC:}/{.passL:}inphp_api.nim,python_api.nim,lua_api.niminsidewhen defined(macosx):to prevent MacPorts paths from leaking into Linux builds. - Docs workflow — added
permissions: contents: writefor thegh-pagespush. - Ruby extension CI —
tim-ruby/.github/workflows/build.ymlbuilds the native extension viarepository_dispatchfor x86_64-darwin, arm64-darwin, and x86_64-linux.
🔗2026-07-04
🔗New features
- Element multiplication —
tag*Nrepeats an HTML element N times with an injected$iindex variable (0-based). Example:li*3: $items[$i]produces three<li>elements. @import "std/..."system — populated the stdlibs table and fixedlibobjects.nimsyntax errors; switchedbuild.nimtoinitCompilerfor stdlib pass-through.- Request API — exposed the Supranim request API as foreign functions callable via
$this.getPath(),$this.getMethod(),$this.getQuery("key"),$this.getHeader("key"),$this.getBody(),$this.getIp(),$this.getUrl(),$this.getAgent(),$this.getParam("key"). @staticcompile-time evaluator — forforloops andif/elif/elseconditionals. The body is captured as raw text,{$varName}/$varNamepatterns are substituted with literal iteration values, then re-parsed by an inner parser. Supports literal arrays andstart..endinteger ranges (e.g.@static for $x in 1..12:).- Lexer gains
tkIs/tkIsNot— recognized as infix operators (precedence 5, equal to==), with stdlib implementations that compare values at runtime byTypeId. (Note: in the current engine the identity helpers are available as theis(a, b)/isnot(a, b)functions.)
🔗Changes
- Updated stdlib for VanCode v0.1.9
ValueStorageAPI —Object.fieldschanged fromseq[Value]toseq[ValueStorage](inline primitive storage). All field reads now use.toValue, all field writes use.toStorage. No functional changes.
🔗Fixes
- Fixed
addCallableKeyError in VanCode when theexportFunctionskey is missing on overloaded function names. - Exported macros (
macro foo*) now properly cross module boundaries viaexported = trueingenMacro. servecommand no longer hardcodes template paths — readscompilation.source,compilation.output, and subdirectory paths fromtim.config.yml.- Fixed
sourceandoutputfields intim.config.yml. parseVarIdentnow handles generic type annotations (var abc: array[string]).CompilationPolicyis now threaded fromengine.config.compilation.policyinto the codegen viainitCompiler, enabling per-project feature restrictions (imports, stdlib, packages, loops, conditionals, assignments, dynamic libs).- Ruby gem automation —
release.ymlpushes platform-specific binaries (x86_64-darwin, arm64-darwin, x86_64-linux) toopenpeeps/tim-rubyon tag releases. - Removed hardcoded MacPorts paths from Clue's
ruby_api.nim— uses project-levelpkg-configinstead.