ChaiScript is an embeddable scripting language inspired by JavaScript. It is designed as header-only library that is directly targeted at C++.
ChaiScript describes itself as an easy to use embedded scripting language for C++. Some key features:
- Header only; no external library is necessary, just a C++11 compiler.
- Thread safe by default
- Portable; tested on 32 and 64 bit Windows, clang++ and g++
- BSD licensed
More info:
A tiny example:
#include <chaiscript/chaiscript.hpp>
std::string helloWorld(const std::string &t_name)
{
return "Hello " + t_name + "!";
}
int main()
{
chaiscript::ChaiScript chai;
chai.add(chaiscript::fun(&helloWorld),
"helloWorld");
chai.eval("puts(helloWorld(\"Bob\"));");
}