BRUTUS
A cross-platform runner for Brut files. Brutus uses luajit to drive applications, allowing either a bundled brut.dat
or main.lua
file to start execution. If a main.lua
file is found, execution works like a standard Lua interpreter environment. When running in a bundled context, Brutus emulates the Lua package system via modules found in the Brut file; falling back to the filesystem for modules not contained in the bundle.
Bundles can easily be created with the brutus ship
command. This gathers all .lua
files in the current directory, compiles them to Lua bytecode, compresses the bytecode via LZ4, then base64 encodes the data before adding it to the bundle.
MODULES
The brutus
module exposes information about the current context and is imported implicitly:
brutus.arch: string -- x86, x86-64, arm32, arm64 brutus.os: string -- windows, darwin, unix brutus.bundle: bool -- true if executed via a brut.dat file brutus.readall: fn(path: string): string|nil -- reads a file and returns the contents or nil
SOURCE
The implementation of Brutus can be found here.