The luau Plugin loads a Script Headless (#79) #91
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/cinnabar!91
Loading…
Reference in a new issue
No description provided.
Delete branch "luau-plugin-loads-a-script-headless"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #79. Part of #75.
What
A
luauPlugin that stands up Headless, hosts one Luau VM, and runs a Script handed to it as bytes.cinnabar.script/1withload(self, name, source: Byte_Span) -> boolandunload(self, name) -> bool. Requires no other Interface.registerand closed inshutdown.printandwarnare rebound to the engine logger at info and warning. Arguments are rendered without running__tostring, so no Luau error can unwind a callback's Odin frame (ADR-0015).pcallwith a traceback handler. A compile or runtime failure logs the message and traceback, returns false, and leaves any Script already loaded under that name in force.contextbefore calling Odin (ADR-0008).plugins/luaujoins the justfilepackageslist.Tests
tests/luau/plugin_test.odindrives the Plugin with Luau source strings only and covers every acceptance criterion: Headless init/tick/shutdown,printandwarnlevels, global isolation in both directions, compile failure with the compiler message, runtime failure with a traceback,unloadtrue/false, and replace-on-reload.just checkandjust testpass (410 tests across six suites).