From 1100f78932331db5e34db13c6b75db0f351d8f6c Mon Sep 17 00:00:00 2001 From: Stanisław Zagórowski Date: Sun, 14 Jan 2024 22:15:15 +0100 Subject: feature: Add dev mode --- src/luax/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/luax') diff --git a/src/luax/mod.rs b/src/luax/mod.rs index 1e87124..55a9f48 100644 --- a/src/luax/mod.rs +++ b/src/luax/mod.rs @@ -130,7 +130,7 @@ pub fn preprocess_dir(path: &Path, output_path: &Path) -> Result { Ok(preprocessed) } -pub fn prepare_lua() -> Result { +pub fn prepare_lua(dev_mode: bool) -> Result { let lua = Lua::new(); // create a table called "reluax" with common utility functions @@ -142,6 +142,7 @@ pub fn prepare_lua() -> Result { reluax.set("url_matches", url_matches)?; let url_extract = ctx.create_function(utils::url_extract)?; reluax.set("url_extract", url_extract)?; + reluax.set("dev_mode", dev_mode)?; ctx.globals().set("reluax", reluax)?; -- cgit v1.3.1