build: single-file bundles build/Rosetta.luau + build/rosetta.lua (tools/bundle.py), terse README with generated format / codec tables
- tools/bundle.py: every module a function in __FILES with a cached __include; requires become __include calls, so only the API and its load-time requires run on require. Rosetta._internal(path) includes any module by its src path. --!native modules get @native on each function (NATIVE re-checked on the bundle); linemaps map bundle lines back to sources (--where). LuaJIT bundle inlines the compat prelude. - tools/build.py: the multi-file trees move to build/_modules (gitignored); each target also writes its bundle. - tools/test.sh: api + docs/example tests also run against both bundles; fails when build/ is stale. - default.project.json mounts build/Rosetta.luau; examples/love loads build/rosetta.lua. - README: one line, install, quick start, doc links, generated format table and codec list (tools/gen_registry.py), licence TODO. DOCS lint checks the generated sections and the links.
This commit is contained in:
1 parent
0bd7b87d2b
commit
bcf6d46fb7
16 files changed
+399611
-210
No files matched your search
+2
-1
@@ -1,5 +1,6 @@
|
||||
-- compat/luajit.lua: the Luau standard library pieces rosetta uses, for LuaJIT 2.1 (plain luajit and LÖVE).
|
||||
-- tools/build.py copies this file to build/luajit/rosetta/_compat.lua, and every built module starts with
|
||||
-- tools/build.py copies this file to build/_modules/luajit/rosetta/_compat.lua (tools/bundle.py inlines it at the top
|
||||
-- of build/rosetta.lua), and every built module starts with
|
||||
-- local __compat = require("rosetta._compat") local buffer, bit32, utf8, typeof, type, __iter = ...
|
||||
-- on its first line (so line numbers match the source). Nothing here is installed as a global; the table/math/string
|
||||
-- additions (table.create, math.clamp, string.split, ...) are added to the standard libraries only where missing.
|
||||
|
||||
Reference in new issue
Block a user