2023-03-12 09:56:31 +08:00

11 lines
285 B
Lua

return setmetatable({}, {
__index = function(t, k)
local res, engine = pcall(require, [[Trans.backend.]] .. k)
if not res then
error([[Fail to load backend: ]] .. k .. '\n ' .. engine)
end
t[k] = engine
return engine
end
})