Skip to content

rune-luau: Luau native code is the opt-in native-code feature; every VM made a 4 MiB code block - #743

Merged
Hona merged 1 commit into
devfrom
luau-native-opt-in
Nov 12, 2026
Merged

Hona merged 1 commit into
devfrom
luau-native-opt-in

Conversation

@Hona

@Hona Hona commented Nov 12, 2026

Copy link
Copy Markdown
Member

Scripts run in Luau's interpreter by default; native-code turns on Luau's native code generation for --!native modules (Windows and Linux).

mlua's luau-jit made a code generator in every Lua state as it started, each committing a 4 MiB code block for its entry thunks whether a native module ever loaded or not. OpenCode (Rune)'s 21 plugin VMs held 88,080,384 bytes of commit this way with no --!native module among them; on Home its private bytes went from 273 MB to 221 MB with only this change.

The luau-panel example keeps native code on, for its interpreter-against-native bench.

…VM made a 4 MiB code block

mlua's luau-jit made a Luau code generator in every Lua state as it started, and each one
committed a 4 MiB code block for its entry thunks whether a --!native module ever loaded or
not. OpenCode's 21 plugin VMs held 88,080,384 bytes of commit this way with no native module
among them (Home: 273 MB private before, 221 MB after, same build otherwise).

Scripts now run in Luau's interpreter unless an app turns on native-code (Windows and Linux,
x86-64 and arm64); a --!native module then compiles as before. The luau-panel example keeps
native code on where Luau has it, for its interpreter-against-native bench.
Copilot AI balanced review requested due to automatic review settings November 12, 2026 06:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Hona
Hona merged commit b62a3d3 into dev Nov 12, 2026
1 check passed
@Hona
Hona deleted the luau-native-opt-in branch November 12, 2026 06:49
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