Product Variants
TeaScript is available as
- a C++ Library for to be embedded in C++ Applications
- a host application for executing standalone TeaScript files + offering an interactive shell, a REPL, debugging help, time measurement and other features.
The latest release of TeaScript can be downloaded here:
☛☛☛ Try and download TeaScript here. ☚☚☚
Following a comparison table for the high-level features of the most common script language libraries for C++.
More details to the table and the different C++ scripting libraries is available in the blog post: Script Language Comparison for embed in C++.
Feature | TeaScript | ChaiScript | Jinx | Squirrel | AngelScript | Wren | Lua | Python |
---|---|---|---|---|---|---|---|---|
C++ Header only Lib | ✅✅ | ✅ | ✅✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
C++ Library (ordinary) | 🔵 *** (✅ planned**) | ❌ | ✅ | 🔵 | ✅ | ❌ | ❌ | ❌ |
Easy to use C++ API | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
Modern C++ (covers also coding techniques / style) | ✅✅ (C++20) | ✅ (C++11/14) | ✅✅ (C++17) | ❌ | ❌ | ❌ | ❌ | ❌ |
Line-By-Line capable Parser | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❓ | ✅ |
Intermediate evaluation of parsed input | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❓ | ❓ |
Suspendable (stop execution and continue later) | ✅✅ | ❌ | ✅✅ | ❌ | ✅ | ✅ | ✅ | ❓ |
Close to C++ Syntax | 🔵/✅ (some aspects more, some other less) | ✅✅ | ❌ | ❌ | ✅✅ | 🔵 | ❌ | ❌ |
Modern language features | ✅✅ | 🔵 | ✅✅ (very unique but procedural) | ✅ | ❌ | 🔵 | 🔵 | ✅ |
Unique/fresh/creative (and fitting) language design | ✅ | 🔵 | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
Multithreading support (from within the language) | ❌ (✅ planned**) | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Coroutine support | 🔵 (from within language) ✅ (from C++ API) | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Garbage Collector | ❌ | ❌ | ❌ | 🔵 | ✅ | ✅ | ❌ | ✅ |
RAII / RC counted | ✅ | ✅ | ✅ | 🔵 | ❌ | ❌ | ✅ | ✅ |
Bytecode / integrated VM | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Rich integrated core library | ✅ | 🔵 | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ |
integrated web / network functionality | ✅ (as a preview, will be improved more) | ❌ | ❌ | ❌ | ❌ | ❌ | ❓ | ✅ |
modules / module / plugin system | 🔵 (✅ planned for next*) | 🔵 | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
Test, Analyze and debugging capabilities | ✅ (will be improved more) | ❌ | ❌ | ❌ | ❌ | ❌ | ❓ | ✅ |
Mature | 🔵 (✅ with 1.0 release) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Maintained | ✅ | ❌ | ❓ | ❌ | ✅ | ❌ | ✅ | ✅ |
* planned for next means the feature will be added most likely within the next couple of pre-releases (minor version updates).
** planned means the feature will be most likely available before the first major release 1.0.
*** planned for later means the feature will probably be available only in a version after the 1.0 release.
Note: The “planned” and “planned for next” features for TeaScript are marked with ✅ already assuming they will be available in a not very far away future.
Can TeaScript be used for production already?
Yes, it can. I explain why and what is the best practice:
First, although the 1.0 release is not done yet, every release has 3 levels of quality assurance:
- UnitTests – on C++ as well as on TeaScript level (TeaScript files testing TeaScript features).
- Functional tests with scripts.
- Manual testing.
This ensures a high level of quality already.
Second, the TeaScript syntax and language features which are present already will stay compatible and are covered by the tests mentioned above. In new versions new syntax and new language features will be added, but old written scripts will still be functional in 99% of the cases (only if the script used some quirks or rely on broken functionality or if really big issues are addressed, this backward compatibility might not be hold.)
Third, usage of the high-level C++ API only. This API will stay backward compatible or a soft migration will be provided – except if major issues are detected or at very rare circumstances.
The high-level API consists of the classes teascript::Engine
/ teascript::EngineBase
, all public getters in teascript::ValueObject
as well as everything in Exception.hpp / SourceLocation.hpp and version.h (except where otherwise noted).
☛☛☛ Try and download TeaScript here. ☚☚☚
TeaScript License
TeaScript is 100% Open Source and Free Software.
The TeaScript C++ Library is licensed under the Mozilla Public License 2.0.
The Mozilla Public License can be read here https://www.mozilla.org/en-US/MPL/2.0/
This license has the following advantages for TeaScript and for its users:
- It is explicit compatible with AGPL, GPL and LGPL.
- It is compatible with Apache, MIT, BSD, Boost licenses (and others).
- Larger works (means Applications using TeaScript) can be distributed closed source (or under a compatible license) as long as the conditions are fulfilled.
- It can be linked statically (if all conditions are fulfilled).
- For the upcoming module system it means that a new first- or third-party module for TeaScript may use any compatible license like MPL-2.0, (A)GPL, MIT, Apache and so on.
Many questions regarding the MPL are also answered in the official MPL 2.0 FAQ
The TeaScript Host Application uses a different license.
It is licensed unter the AGPL-3.0.
If you have further questions regarding the licenses don’t hesitate to contact me.