inject_modules rule would be great for injecting libraries and global functions too (exampe: injecting libraries of luau written in pure lua to emulate luau outside of luau)
local buffer = require("{top_path}/_DARKLUA_lib{buffer_blake3_hash}")
local typeof = require("{top_path}/_DARKLUA_lib{typeof_blake3_hash}")
print(typeof(buffer.create))
Completely agree! I had to do this just yesterday with a bash script in order to get the task library added to code that I deploy in both lune and roblox.
inject_modules
rule would be great for injecting libraries and global functions too (exampe: injecting libraries of luau written in pure lua to emulate luau outside of luau)Example
.darklua.json5
src/main.lua
After processing: