C++17 · header-only · standard library only
A small scripting language for C++.
Thimble is for rules, configuration and small automation tasks inside a C++ application. The host decides which values and functions a script can use.
rule.thimble
var score = initial_score;
if (score >= passing_score) {
return "accepted";
}
return "review";
Small runtime
Five value types, lexical scope, functions, conditions and loops.
Explicit host API
Bind C++ values and callbacks by name. Nothing else is available to a script.
Bounded execution
Errors include exact source locations. Runs can bound steps, call depth, collection growth, allocation work and time.
Project status
The first version stays deliberately limited.
Script-defined classes and records, modules, exceptions, concurrency and file or network access are outside the initial language. Host objects are available through explicit descriptors.
- Values: null, bool, int, real, string
- Statements: let, var, if, else, while, return
- Operators: arithmetic, comparison, logical
- Distribution: separate headers or one amalgamated header