ChaiScript is the first and only scripting language designed from the ground up with C++ compatibility and modern design in mind. It is an ECMAScript-inspired, embedded functional-like language.
ChaiScript is licensed under the BSD license.
ChaiScript is the first and only scripting language designed from the ground up with C++ compatibility and modern design in mind. It is an ECMAScript-inspired, embedded functional-like language.
ChaiScript is licensed under the BSD license.
Due to an increased release schedule, and the nature of ChaiScript being a header-only library, binary releases will be made less often. Previous releases can be found on github.
Version: 4.2.0 Released: 12/1/2012
(Requires Boost)
Source (tar.bz2)
Source (zip)
Version: 5.2.0 Released: 12/1/2012
(Requires C++11 Compiler)
Source (tar.bz2)
Source (zip)
Hi,i try to get data from c++ function by a vector, but how set std::vector to a chaiscript vector ?
c++ code :
std::vector<std::string> getVect()
{
std::vector<std::string> vect;
vect.push_back("test 1");
vect.push_back("test 2");
vect.push_back("test 3");
vect.push_back("test 4");
return vect;
}
chai.add(fun(&getVect),"getVect());chaiscript code :
var vect = Vector();
vect = getVect(); // problemeThank.
There's no built in way to do
There's no built in way to do conversions between typed vectors and vectors of
Boxed_Value. We tried to implement that, but it introduced too much overhead in the code.So, you'll need to do it manually in your code. You need to either just return a
vector<Boxed_Value>or provide a function that converts to it:Or convert:
I've been pondering adding something like the above into the utils library.
Don't forget to tell your friends about ChaiScript.
-Jason