Skip to content

#pragma native

Preprocessor

Emit --!native so Luau can compile the script as native code.

#pragma native
--!native

Pairs well with #pragma optimize 2. Valid in .clh, .clp, and .clpp.

#pragma native
#pragma optimize 2
void init() {}

pragma-optimize · pragma-strict