Skip to content

Conversation

bjcscat
Copy link
Contributor

@bjcscat bjcscat commented Aug 21, 2024

Luau provides a parameter to lua_load which is a stack index for the environment which a chunk should be loaded with.

Using this over setfenv is preferred as setfenv impacts or entirely impedes Luau's JIT compilation.

This should also be backported to v0.9

@khvzak khvzak changed the base branch from main to pr-442 August 25, 2024 15:50
@khvzak khvzak merged commit 7bfd327 into mlua-rs:pr-442 Aug 25, 2024
127 of 128 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants