Make stdlib
* Build the standard library as a module .so * Locate and load lib at runtime as a module if it is not provided to the ChaiScript constructor. Decreases compile time by 1/2 for common use cases where the user can use the dynamic library module.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include <chaiscript/chaiscript.hpp>
|
||||
#include <chaiscript/chaiscript_stdlib.hpp>
|
||||
|
||||
#ifdef READLINE_AVAILABLE
|
||||
#include <readline/readline.h>
|
||||
@@ -177,7 +176,7 @@ int main(int argc, char *argv[])
|
||||
modulepaths.push_back(modulepath);
|
||||
}
|
||||
|
||||
chaiscript::ChaiScript chai(chaiscript::Std_Lib::library(), modulepaths,usepaths);
|
||||
chaiscript::ChaiScript chai(modulepaths,usepaths);
|
||||
|
||||
chai.add(chaiscript::fun(&myexit), "exit");
|
||||
chai.add(chaiscript::fun(&myexit), "quit");
|
||||
|
Reference in New Issue
Block a user