TeaScript
An embeddable and standalone multi-paradigm script language with modern programming features β close to C++ syntax, but easier to use.
In a nutshell
TeaScript can be used
- to extend C++ applications with TeaScript dynamically at runtime via the TeaScript C++ Library β once your application has customization points for TeaScript, every installation can be extended or modified without the expensive re-compile-and-redeploy cycle.
- for arbitrary tasks by executing standalone TeaScript files via the TeaScript Host Application.
Architectural overview β a C++ application invokes TeaScript at customization
points via the TeaScript C++ Library.
A TeaScript "Hello World" is just one line:
println( "Hello World from TeaScript!" )
β¦and the smallest possible C++ embedding is about six:
#include "teascript/Engine.hpp"
int main()
{
teascript::Engine engine;
std::cout << engine.ExecuteCode( "2 + 3 * 2" ).GetAsInteger() << std::endl;
return EXIT_SUCCESS;
}
More β bidirectional interop, in-string evaluation, lambdas / higher-order functions, named tuples, generic dispatch and much more β on the Overview & Highlights page.
Explore the site
Releases / Downloads
The latest TeaScript C++ Library and Host Application binaries β Windows, Linux and source.
Tutorials
Step-by-step guides β coming soon.
Blog / Release Articles
Per-release feature write-ups and the occasional deeper-dive post on language design and benchmarks.
Latest from the blog
Latest release article
Latest blog post
Going deeper
- Comparison of C++ scripting libraries β how TeaScript stacks up against ChaiScript, Lua, Python, JavaScript, AngelScript, Wren and Squirrel for embedding in C++.
- TeaScript vs ChaiScript β Fibonacci benchmark β measured against the closest competitor on recursive Fibonacci(25); a second benchmark filling an image buffer is in the 0.13 release post.
- TeaScript on GitHub
β source for the TeaScript C++ Library, issue tracker, demo programs and
example
.teascripts.