mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-11 22:20:03 +08:00
17 lines
324 B
C++
17 lines
324 B
C++
|
|
#include <chaiscript/chaiscript.hpp>
|
|
#include <string>
|
|
|
|
std::string hello_world()
|
|
{
|
|
return "Hello World";
|
|
}
|
|
|
|
CHAISCRIPT_MODULE_EXPORT chaiscript::ModulePtr create_chaiscript_module_test_module()
|
|
{
|
|
chaiscript::ModulePtr m(new chaiscript::Module());
|
|
|
|
m->add(chaiscript::fun(hello_world), "hello_world");
|
|
return m;
|
|
}
|