Files
2024-05-13 11:48:08 -04:00

23 lines
1.2 KiB
Julia

module CppHello
using CxxWrap
@wrapmodule(() -> joinpath("./build", "libhello"))
function __init__()
@initcxx
end
end
function Re3DMod()
println(CppHello.greet())
println("""
This is a test of how a Re3D plugin/mod can work with components of the Re3D game engine. Plugins/mods can be written in Julia. Julia is a performant just in time compiled (JIT) language. Julia is easily embeddable into C++/C programs. Julia also has great interopt with C++/C however the former requires a library, so using C++ components are less painful. Re3D takes care of exposing the API for Julia. All Julia needs to do is define a module which automatically loads the C++ API for the game engine. While this implementation is very primitive and not included in the engine as of now there is potential in it.
""")
println("""
Plugins/mods written in Julia may also be changed easily. No recompilation of the engine required! Although it may be possible it's not a good idea to make changes to mods/plugins as the engine is running them. I would also suggest against reloading them in order to apply the new changes. Unexpected bugs may occur during runtime.
""")
end