Reduce cost of including chaiscript.hpp
- ChaiScript no longer includes or automatically instantiates std lib - ChaiScript constructor now requires an std lib instance in the form of a ModulePtr object - This new layout facilitates better usage of compilation firewalls and factories for reducing the overall impact of ChaiScript on a project
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <chaiscript/chaiscript.hpp>
|
||||
#include <chaiscript/chaiscript_stdlib.hpp>
|
||||
#include <chaiscript/dispatchkit/function_call.hpp>
|
||||
|
||||
void log(const std::string &msg)
|
||||
@@ -66,7 +67,7 @@ void take_shared_ptr(const std::shared_ptr<const std::string> &p)
|
||||
int main(int /*argc*/, char * /*argv*/[]) {
|
||||
using namespace chaiscript;
|
||||
|
||||
ChaiScript chai;
|
||||
ChaiScript chai(Std_Lib::library());
|
||||
|
||||
//Create a new system object and share it with the chaiscript engine
|
||||
System system;
|
||||
|
||||
Reference in New Issue
Block a user