(Lua version) Add experimental syscall_overrides
config option
#3375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #3280 and #3369.
This is a ~equivalent version of #3369 using Lua expressions instead of CEL expressions. This uses the "vendored" feature of mlua so that a system Lua interpreter doesn't need to be installed. I chose the "lua54" feature because 54 was the biggest number.
Unfortunately, I don't see a way to compile the expressions ahead of time, so they're compiled each time they're evaluated. (Compiled functions are non-send non-sync
Function<'lua>
where'lua
is the lifetime of the interpreter, which leads to issues.)I wrote this PR without much thinking and without knowing anything about Lua, but it seems to work.