#![allow(dead_code)] use std::path::PathBuf; pub fn probe_lua() -> Option { #[cfg(feature = "lua54")] let artifacts = factorio_lua_src::Build::new().build(factorio_lua_src::Lua54); #[cfg(feature = "lua53")] let artifacts = factorio_lua_src::Build::new().build(factorio_lua_src::Lua53); #[cfg(feature = "lua52")] let artifacts = factorio_lua_src::Build::new().build(factorio_lua_src::Lua52); #[cfg(feature = "lua-factorio")] let artifacts = factorio_lua_src::Build::new().build(factorio_lua_src::LuaFactorio52); #[cfg(feature = "lua51")] let artifacts = factorio_lua_src::Build::new().build(factorio_lua_src::Lua51); #[cfg(feature = "luajit")] let artifacts = { let mut builder = luajit_src::Build::new(); if cfg!(feature = "luajit52") { builder.lua52compat(true); } builder.build() }; #[cfg(feature = "luau")] let artifacts = luau0_src::Build::new().build(); artifacts.print_cargo_metadata(); Some(artifacts.include_dir().to_owned()) }