Skip to main content

luaur_code_gen/functions/
compile_code_gen_context.rs

1use crate::records::compilation_options::CompilationOptions;
2use crate::records::compilation_result::CompilationResult;
3use crate::records::compilation_stats::CompilationStats;
4use crate::type_aliases::lua_state::lua_State;
5use crate::type_aliases::module_id::ModuleId;
6
7/// **Out of scope.** `Luau::CodeGen::compileInternal` generates and installs
8/// native machine code; luaur's execution oracle is the bytecode interpreter
9/// (see docs/CONFORMANCE.md), so this was never ported. It survived only as an
10/// `extern` declaration of the original C++ mangled symbol, which has no
11/// implementation to link against (lld DCE'd the reference on Linux/macOS, MSVC
12/// kept it → unresolved external symbol on Windows). Stub it explicitly.
13#[allow(unused_variables)]
14pub fn compile_module_id_lua_state_i32_compilation_options_compilation_stats(
15    module_id: &ModuleId,
16    l: *mut lua_State,
17    idx: i32,
18    options: &CompilationOptions,
19    stats: *mut CompilationStats,
20) -> CompilationResult {
21    unimplemented!(
22        "luaur does not execute JIT-compiled native code (out of scope; see docs/CONFORMANCE.md)"
23    )
24}