@s_ol Thanks for taking a look! I'm traveling now and will lose this on Mastodon; if you direct your comments to discussions in the Halfspace and Fidget repos respectively, I will be more likely to get to them!
The short answer is that I'm bending Rhai's calling convention in awkward ways, and am increasingly tempted to write a custom GLSL-style scripting language...