diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-14 22:15:15 +0100 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-14 22:15:15 +0100 |
| commit | 1100f78932331db5e34db13c6b75db0f351d8f6c (patch) | |
| tree | 69c0a73004ddaee615120099451c75c0b16b1624 /src/luax | |
| parent | 2023277d2f83bdd1f86e769df235709d6c84ce2d (diff) | |
feature: Add dev mode
Diffstat (limited to 'src/luax')
| -rw-r--r-- | src/luax/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<usize> { Ok(preprocessed) } -pub fn prepare_lua() -> Result<Lua> { +pub fn prepare_lua(dev_mode: bool) -> Result<Lua> { let lua = Lua::new(); // create a table called "reluax" with common utility functions @@ -142,6 +142,7 @@ pub fn prepare_lua() -> Result<Lua> { 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)?; |
