local terra = require'terra'
This is a slightly modified build of the Terra library which allows the Terra runtime to be loaded from Lua as a Lua/C module. The terra module exposes the complete Terra Lua API and installs a require() loader for loading .t files from the same locations that are used for loading Lua files.
NOTE: 32bit platforms are not yet supported (the included binaries work but there's no interfacing between Terra and Lua and no debug support).
Building terra requires llvm.
Bundling terra requires bunding in the llvm static libraries. There's a script documenting what these are that can be used with bundle directly:
bundle ... -a terra -a "$(csrc/terra/bundle-libs)"
Changes to terra
The source code changes made to terra were kept to a minimum to make it easy to to merge upstream changes back into the luapower terra fork. This is similar to how dynasm was modified for luapower. Anyway, the changelist:
terra dynamic lib does not bundle luajit and is exposed as a Lua/C module.
cudalib.lua are not bundled into the binary, and are provided separately.
strict.lua is not loaded and not included (it's included with luajit and must be loaded manually as needed).
parsing.t were renamed
terra_parsint.t. respectively and are now in the luapower dir along with all Lua files.
- the location of clang's
resource_dir is yet to be determined.
3 years ago
Edit on GitHub