summaryrefslogtreecommitdiff
path: root/src/ffi/luau/luacode.rs
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2022-02-19 14:15:15 +0000
committerAlex Orlenko <zxteam@protonmail.com>2022-03-20 20:30:20 +0000
commitc322e028e2201fbb12a77caceb1dc97b1822ae54 (patch)
tree7d625c01e641a96516ea1042f2b4c6e8399e3285 /src/ffi/luau/luacode.rs
parent6dc127f4eb500398ffd81edcb24d45353b0ff4cf (diff)
downloadmlua-c322e028e2201fbb12a77caceb1dc97b1822ae54.zip
Initial Luau support
Diffstat (limited to 'src/ffi/luau/luacode.rs')
-rw-r--r--src/ffi/luau/luacode.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ffi/luau/luacode.rs b/src/ffi/luau/luacode.rs
new file mode 100644
index 0000000..3f24b65
--- /dev/null
+++ b/src/ffi/luau/luacode.rs
@@ -0,0 +1,22 @@
+//! Contains definitions from `luacode.h`.
+
+use std::os::raw::{c_char, c_int};
+
+#[repr(C)]
+pub struct lua_CompileOptions {
+ pub optimizationLevel: c_int,
+ pub debugLevel: c_int,
+ pub coverageLevel: c_int,
+ pub vectorLib: *const c_char,
+ pub vectorCtor: *const c_char,
+ pub mutableGlobals: *mut *const c_char,
+}
+
+extern "C" {
+ pub fn luau_compile(
+ source: *const c_char,
+ size: usize,
+ options: *mut lua_CompileOptions,
+ outsize: *mut usize,
+ ) -> *mut c_char;
+}