TeaScript Releases / Downloads

Latest Release

Patch Release TeaScript C++ Library 0.15.1 (03. November 2024) – This patch release fixes the header only compile mode which was broken for Engine/CoroutineScriptEngine.

TeaScript 0.15.0 Release β˜• (01. September 2024)

πŸ”₯NEWπŸ”₯: Web Server / Web Client module preview, full JSON read/write support and more.
All details of the new features are in the news blog post: Release of TeaScript 0.15.0

Choose your desired download package:

✯ TeaScript C++ Library
✯ TeaScript Host Windows 10/11 (64 bit)
✯ TeaScript Host Linux (Ubuntu 22.04 / 64 bit)

or click a button:

A snapshot of the TeaScript C++ Library is also available on Github. (But the download package here has additional example script files included.)

Key Points

✯ General: TeaScript is a Multi-Paradigm script language close to C++ syntax but easier to use. Read more about the language features and highlights in the Overview and Highlights section.

✯ C++ Library: Embed TeaScript in your Application with the easy to use and modern C++ API (header only – no dependencies!) and extend your Application with anything needed dynamically during runtime!
Read more here: C++ Script Library Comparison.

✯ C++ Library: TeaScript can be easily extended and customized with arbitrary functions and your own types and classes as Passthrough data or callback function contexts.

✯ C++ Library: Customize and configure the integrated Core Library exactly for your application (e.g. prevent loading of all file modification functions if this functionality should not be available in script code.)

✯ Host: No installation required – Just download, unpack and use it!

✯ Host: Carry your script collection and the TeaScript Host on an USB-Stick with you and use it everywhere you need it!

✯ Host: Testing, Analyzing and Debugging capabilities are on board.

Download the package here:
TeaScript C++ Library: TeaScript_CppLibrary_v0.15.1.zip
TeaScript Host Windows: TeaScript_v0.15.0_win64.zip
TeaScript Host Linux (Ubuntu 22.04): TeaScript_v0.15.0_linux64.tgz

or click a button:

Source Host Application: The source of the Host Application is included in the Windows and Linux package above.
Note: When compiling the Host Application for Linux you can use (optionally) the GNU Readline Library for a better REPL experience: GNU_Readline_8.2.tgz
The pre-compiled Linux package above has this always included and activated.

The SHA-256 hash of the Windows TeaScript.exe (use Windows PowerShell) and the Linux TeaScript binary (use sha256sum):

Get-FileHash .\TeaScript.exe -Algorithm SHA256 | Select-Object Hash

Hash
----
5A58C4A680FDDDF4EB4657F6CE06D579975F7FA18A577A2FB055814382D112BC

sha256sum  ./bin/TeaScript 
f9cbfa524807a4fbce78b6fdedc4dca598afb4382dee07e2f79dffda5cd53a5e  ./bin/TeaScript

More Infos

More information about the TeaScript language is available here:

✯ Overview and Highlights
✯ TeaScript language documentation
✯ Core Library documentation
✯ The release articles for tutorial-like introduction of new features

Also, the contained example TeaScript files showing very good the language and Core Library features (They are included in the download packages and partly on Github, for example dir.tea, format_string.tea, example_v0.12.tea, example_v0.13.tea, write_image.tea, web_client.tea and web_server.tea).

For the C++ Library the teascript_demo.cpp, suspend_thread_demo.cpp and coroutine_demo.cpp showing some good example use cases. The high-level API is well documented in the source.

Basic Instructions Host Application

The TeaScript Host Application has 2 main operation modes:

  • the interactive shell
    and
  • execution of a script file
Launching interactive shell

For Windows: After download, just unpack the package (e.g. “Extract All” from file context menu) to any destination, then either invoke TeaScript.exe from the Explorer (double click) or from the command line (recommended) for launch the interactive shell of TeaScript.
For Linux: just unpack and execute <package_root>/bin/TeaScript

Typing :q <enter> will quit the application (or when press Ctrl+C).

Internal commands for the TeaScript shell always start with a colon :.

:help or :? will show a list of internal commands.

Entered text without a starting colon will be interpreted as TeaScript syntax and will be parsed + evaluated.

Example 1:
3 + 4 * 2
will print 11 on the screen.

Example 2:
println( "Hello World!" )
will print Hello World! on the screen.

TIP 1: Use :ls vars for get an overview of all present toplevel variables and functions.

TIP 2: Use debug variablename for get debug information about the variable with name “variablename”.

Use :q or :quit or :exit to end the interactive shell.

Executing script files

(for Linux use the <package_root>/bin/TeaScript accordingly)

TeaScript.exe [optional params] scriptfile.tea [optional script arguments]
e.g.: TeaScript.exe examples\helloworld.tea

Use TeaScript.exe --help for get available parameters and execution modes.
For example, use -T for time measurement of bootstrap, parsing and evaluation time or use -i for enter the interactive shell after the script file has been executed.

Read also the contained readme.txt for more information and have a look on the various documentation pages on this site:
✯ Overview and Highlights
✯ TeaScript language documentation
✯ Core Library documentation
✯ The release articles for tutorial-like introduction of new features

Please, read also the contained LICENSE.TXT for usage conditions and permissions.

HINT: You can verify whether TeaScript is functional on your system by executing the contained test scripts from the “examples” folder: All files starting with corelibrary_test and fileio_test01.tea. These test scripts also demonstrate a part of the internal test coverage of TeaScript.

Basic Instructions C++ Library

Supported compiler (tested with):

Visual Studio 2022 (17.2 or newer) — Visual Studio 2019 also works (starting from 16.11.14)
g++ 11.3 — Use g++ 13 for all linux specific known issues are solved (see Known_Issues.txt)
clang 14 (with libstdc++ or libc++) — There are clang and/or libc++ specific known issues (see Known_Issues.txt)

Newer compilers should work in general.
All compilers are compiling in C++20 and for x86_64.

Dependencies:

None – for fully C++20 supporting compilers / C++ standard libraries.

Libfmt (as header only) – for gcc 11 / clang 14 (tested with libfmt 11.0.2, libfmt 10.2.1 and libfmt 10.1.1)
Libfmt can be downloaded here https://fmt.dev/latest/index.html
You only need to set the include path in your project(s) / for compilation. Detection is then done automatically.

Hint: For Windows with C++20 it is also recommended to use libfmt for the best possible Unicode support for stdout.

Optional Features:

Web Preview – In order to enable the Web Preview module the following steps have to be done:
1.) Add include /modules/include/
2.) Add include to the Boost Library. (You don’t need to compile Boost, TeaScript is using only header only libs from there)
3.) Add modules/WebPreview.cpp to your project compilation.
4.) (Optional) If you want the default Engine loads the WebPreview module set the define TEASCRIPT_ENGINE_USE_WEB_PREVIEW to 1


TOML Support – for the integrated TOML Support you need the toml++ Library. (tested with 3.4.0)
You can find the toml++ library here: https://github.com/marzer/tomlplusplus
You only need to set the include path in your project(s) / for compilation. Detection is then done automatically.
See include/teascript/TomlSupport.hpp for some more details.

Color and Format String Support – for colorful output and the format string feature you need the libfmt library.
See Libfmt section above.

JsonAdapter – You can change the Json library which is used by TeaScript to one of nlohmann::json, RapidJSON and Boost.Json.
Per default PicoJson is used and is enabled by default.
For use a different adapter you must do the following steps:
1.) Add include to /extensions/include/.
2.) Add the corresponding JsonAdapter.cpp to your project, e.g., extenstions/JsonAdapterNlohmann.cpp
3.) Add include for the json library of use, e.g., /nlohmann_3.11.3/single_inlude/
4.) Set the define TEASCRIPT_JSON_FLAVOR to the desired Json flavor, e.g., TEASCRIPT_JSON_NLOHMANN.

Building the demo app:

Windows: Use the provided VS-project or the settings in compile.props.
If you make a new project, you only need to add the files teascript_demo.cpp, suspend_thread_demo.cpp and coroutine_demo.cpp and set the include path to /include/

Linux: Use the compile_gcc.sh or compile_clang.sh with prior updated include path to libfmt.

Other: Try the way described for Linux. Maybe it will work.

You can test the demo app by invoking it via the provided gcd.tea:
Windows:
./teascript_demo.exe gcd.tea 18 42

Linux:
./teascript_demo gcd.tea 18 42

If you see 6 as the result everything is functional.

Opt-Out header only usage

The TeaScript C++ Library will be compiled as a header only library per default.
For save includes and compile time it is possible to opt-out header only compilation.

Please, read the instruction in the related release blog post here: Opt out header only.

Hint for display Unicode on Windows

TeaScript is supporting the full range of Unicode. The Strings in TeaScript are always UTF-8 encoded. On Linux systems it just works.

However, the Windows Console by Microsoft still has some trouble when it comes to Unicode support.
If you use the classical Command Prompt (cmd.exe) you must ensure to use a proper font, e.g. “SimSun-ExtB“.

But even then not all Unicode glyphs can be displayed.

Therefore, it is highly recommended to use the “Windows Terminal” application by Microsoft (from MS Store) with either the PowerShell or the classical Command Prompt in order to display all Unicode glyphs.

Unicode Support in TeaScript seen on Command Prompt and PowerShell inside Windows Terminal.
Unicode Support in TeaScript seen on Command Prompt and PowerShell inside the Windows Terminal.

The PowerShell might be needed to be tweaked prior to using Unicode with the following command:
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding

You can test the Unicode support on your system with the contained scripts utf8_test.tea and argout_test.tea.

Pretty print of errors

TeaScript supports pretty print of parsing and evaluation errors for help you to find the cause.
For the C++ Library use the function: teascript::util::pretty_print() / teascript::util::pretty_print_colored()

TIP (for the Host Application): Use --debug or in the interactive shell the enabled :debug mode.

Pretty print of evaluation error

License information

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.

Support my work

If you want to support my work, especially to further develop TeaScript and to run this website, you can do this by a donation of your choice via Paypal:

https://paypal.me/FlorianThake

The donation will be for covering the monthly and yearly costs as well as for free personal use. Every donation will help me to put more time and effort into TeaScript and this webpage. Thank you very much! πŸ™‚

Contact / Support

For bugs and support write an email to contact <the-at-symbol> tea-age.solutions or go to the contact form:

All release articles

Release of TeaScript 0.15.0 β˜• – Web Server / Web Client module preview, full JSON read/write support.
Release of TeaScript 0.14.0 πŸ–₯– TeaStackVM, Compiler, Dis-/Assembler, Suspend+Continue, Yield, improved debugging.
Release of TeaScript 0.13.0 πŸ— – Buffer, U8, U64, bit ops, UTF-8 Iterator, hex integrals, MPL-2.0.
Release of TeaScript 0.12.0 🌈 – Colored Output, Format String, Forall Loop, Sequences, interactive debugging.
Release of TeaScript 0.11.0 πŸŽ‚ – TOML Support, Subscript Operator, Raw String Literals.
Release of TeaScript 0.10.0 🌞 – Tuples/Named Tuples, Passthrough Type, CoreLib config.
Release of TeaScript 0.9.0 🌻
Release of TeaScript 0.8.0 πŸ€

Current Release

TeaScript 0.15.0 (01. September 2024)
Available on top of the page (click).

Old Releases

TeaScript 0.14.0 (15. May 2024)
TeaScript_CppLibrary_v0.14.0.zip
TeaScript_v0.14.0_win64.zip SHA256 TeaScript.exe: F1416004D542A1760A6BE63340E6D416A6A41497E44C7FC4958B7F31CAB8F25F
TeaScript_v0.14.0_linux64.tgz SHA256 TeaScript bin: 5fc4c794ed199f000ecef152599dbba21183d71f14c0e677038fb1118748aa83

TeaScript 0.13.0 (4. March 2024)
TeaScript_CppLibrary_v0.13.0.zip
TeaScript_v0.13.0_win64.zip SHA256 TeaScript.exe: 4F5C653EE851E35B0BD6BDE073F9235D1F91B6890AAA2C97438BD3ABD350B921
TeaScript_v0.13.0_linux64.tgz SHA256 TeaScript bin: f86da0c426330aba309884da581c5c8fc6b6c79f946fa0ceccde7067be75f701

TeaScript 0.12.0 (18. Jan. 2024)
TeaScript_CppLibrary_v0.12.0.zip
TeaScript_v0.12.0_win64.zip SHA256 TeaScript.exe: 5AFD96DC032A12A4E2120227D569A36627725C7DAA5B1CFC62DEA2945AD590DB
TeaScript_v0.12.0_linux64.tgz SHA256 TeaScript bin: 6f5a0960386daac1eaffe1995a6dcf684112613e7aaf4e26fc917a30508aca45

Archive

For older releases visit the Release Archive.

Disclaimer

This software is provided “as-is” without any express or implied warranty. In no event shall the author be held liable for any damages arising from the use of this software.

See also the included LICENSE.TXT for usage conditions and permissions.

This software is a pre-release.
The behavior, API/ABI, command line arguments, contents of the package, usage conditions + permissions and any other aspects of the software and the package may change in a non backwards compatible or a non upgradeable way without prior notice with any new (pre-)release.

If you encounter bugs or problems, have feature wishes or any other question, please, use the contact form above.

Leave a Reply

Your email address will not be published. Required fields are marked *