Manipulate bitmasks, flags, hashes, and tile coordinates directly with &, |, ~ (XOR/NOT), <<, >>, and // integer floor division — backed by exact 64-bit signed integers rather than float approximations.
Enforce immutable locals at compile time with <const> and bind deterministic __close metamethods via <close> so open files, locks, and SQLite statements release automatically on scope exit or error.
local x <const> · local f <close> · __close RAII
02.3
Binary string.pack / unpack & Built-In utf8
Encode and decode binary structs with endianness specifiers via string.pack, string.unpack, and string.packsize, and iterate multilingual Unicode strings safely with utf8.codes, utf8.len, and utf8.char.
Auto-Wired package.path Across 6 Standard Subfolders
SuperCode automatically configures package.path for your workspace root plus src/, lib/, modules/, core/, and utils/ (both ?.lua and ?/init.lua), resolving saved files and unsaved editor tabs alike.
Editing a submodule that ends with return M? Tap Run ▶ right inside core/codec.lua without switching tabs — SuperCode detects your project's main.lua or init.lua entry script and launches it seamlessly.
Run From Any Module Tab · Auto Entry Detection
02.6
1:1 Clickable Tracebacks & Generational GC
Run under Lua 5.4.7's low-latency generational garbage collector with sub-millisecond cold starts and clickable stack traces that jump straight to the exact file and line across multi-folder projects.
Cross-Module Stack Traces · ~400µs Cold Start
Built for Phones, Foldables & Tablets · Lightweight 45 MBLua 5.4 IDE Hub
03STEP-BY-STEP WORKFLOW
How to Structure Multi-File Lua 5.4 Packages on Android
Scale cleanly from a single script to a structured multi-directory Lua codebase.
STEP 01Explorer -> New Folder
Create Modular Directories (src/, lib/, core/)
Place your entry point in main.lua and organize reusable modules into src/, lib/, modules/, core/, or utils/ — zero LUA_PATH tweaking.
STEP 02Lua 5.4 Syntax
Author 64-Bit Bitwise, <const>, and <close> Code
Use modern //, >>, &, <const>, and <close> constructs with live Error Radar syntax checks and offline Lua formatting.
STEP 03Run ▶ Inside Any Tab
Execute From Either main.lua or a Submodule
Press Run even while editing a return M library file — entry arbitration runs main.lua automatically including unsaved edits.
STEP 04Visual Git -> Push
Version & Publish Clean Lua Packages
Review diffs across your module tree in Visual Git and push directly to GitHub, GitLab, or a remote SFTP host.
Native Lua 5.4.7 (SuperCode) vs. Legacy LuaJ 5.2 Android Apps
SuperCode's Native Lua 5.4.7 Interpreter outperforms legacy LuaJ 5.2 Android apps by executing genuine 64-bit Lua 5.4 offline in ~400 microseconds. It supports integer floor division (//), bitwise operators, <const> and <close> variables, string.pack, utf8, and multi-folder require() entry routing.
LUA 5.4.7 VS. LEGACY MOBILE LUA INTERPRETERS
Language Feature
SuperCode (Native Lua 5.4.7)
Java LuaJ 5.2 Android Apps
Single-File Web Demos
Desktop Lua 5.4
Bitwise & // Division
Native & | ~ << >> and 64-Bit //
Syntax Error (Requires bit32)
Online only
Supported
<const> & <close> RAII
Full Lua 5.4 Support (__close)
Not supported
Varies by site
Supported
Binary Pack & UTF-8
Built-In string.pack/unpack + utf8
Missing
Online only
Supported
Multi-Folder require()
Auto-Wires root, src/, lib/, core/, utils/
Breaks on relative paths
Single file only
Manual LUA_PATH
Run Inside Module Tab
Auto-Arbitrates main.lua / init.lua
Runs module & prints nothing
Not applicable
Manual CLI target
Built for Phones, Foldables & Tablets · Lightweight 45 MBGoogle Play
05QUESTIONS & ANSWERS
Frequently Asked Questions
Questions about Lua 5.4 bitwise operators, `<close>` variables, and multi-folder `require()` on Android.
Why do `//` and `&` throw syntax errors in other Android Lua apps?+
Many older mobile Lua apps rely on LuaJ, a Java port frozen around Lua 5.2 before native 64-bit integers, `//` floor division, and bitwise operators were introduced in Lua 5.3/5.4. SuperCode runs genuine native Lua 5.4.7.
How does multi-file `require()` work without setting `LUA_PATH`?+
SuperCode automatically configures `package.path` to search your project root as well as `src/`, `lib/`, `modules/`, `core/`, and `utils/` for both `?.lua` and `?/init.lua` — and even syncs unsaved open tabs before running.
What happens if I press Run while editing `lib/math_ext.lua` instead of `main.lua`?+
If the active file returns a module table (`return M`) and a `main.lua` or `init.lua` exists in your project root, SuperCode automatically runs the entry script so you don't have to switch tabs back and forth.
Does Lua 5.4 `<close>` work if an error is raised inside a block?+
Yes. Just like standard desktop Lua 5.4.7, any local variable marked `<close>` invokes its metatable's `__close(self, err)` metamethod deterministically whether the block exits normally or unwinds via `error()`.
06LUA 5.4, GAME LOGIC & BUILT-IN MODULES GUIDES
Complete Lua 5.4.7 IDE Documentation Suite
Navigate between the main Offline Lua 5.4 IDE hub and all 5 specialized Lua scripting guides.