This commit is contained in:
2026-04-06 14:35:45 -07:00
parent eb4659817e
commit df2360ca46
8 changed files with 11 additions and 240 deletions

View File

@@ -1,5 +1,5 @@
local backend = {}
local network = require("entrypointlib")
local network = require("libs.entrypointlib")
local loop = coroutine.create(network.loop)
local filter = nil

View File

@@ -96,12 +96,9 @@ function stratum.loadTransforms(modules,libpath)
local contents = file.readAll()
file.close()
if not contents then error("failed to read file",2) end
print("applying macros")
contents = stratum.applyMacros(contents,libpath)
print("loading contents")
local trans, err = load(contents,"transforms","t",_ENV)
if not trans then error(err,2) end
print("running contents")
return trans()
end
@@ -112,7 +109,6 @@ function stratum.setBackend(backend)
end
function stratum.createTransform(name,func)
print("registering "..name)
local backend = _STRATUMBACKEND
if not backend or not (backend.sendMessage and backend.receiveMessage) then error("stratum backend not defined or defined incorrectly",2) end
backend.sendMessage({protocol="RegisterTransform",name=name,functionBody=func})