docs: rosetta naming in README, docs, guide, licenses

This commit is contained in:
4DBug committed 2026-11-01 01:19:16 -05:00
1 parent 22ddcd78fa
commit 753ae98d4a
20 files changed
+123 -123

No files matched your search

+5 -5
View File
@@ -1,7 +1,7 @@
# formats-luau API
# rosetta API
`local F = require(Formats)` (Roblox: the ModuleScript; LuaJIT / LÖVE: `require("formats")`; luau CLI:
`require("@formats")`). Everything below is `src/Formats/init.luau` unless noted. Nothing throws on bad data or bad
`local F = require(Rosetta)` (Roblox: the ModuleScript; LuaJIT / LÖVE: `require("rosetta")`; luau CLI:
`require("@rosetta")`). Everything below is `src/Rosetta/init.luau` unless noted. Nothing throws on bad data or bad
arguments: a failing call returns `nil, err` where `err` is a `core/Err` value (`err.code`, `err.message`,
`err.offset`, `err.format`; `tostring(err)` prints `png: CORRUPT at 0x21: bad filter type 7`).
@@ -97,7 +97,7 @@ A format never requires another format, so the api passes these to decoders / en
## Host
`F.host` (`src/Formats/host`): `name` (`"roblox"`, `"love"`, `"luajit"`, `"luau"`), `hasFiles`, `readFile`,
`F.host` (`src/Rosetta/host`): `name` (`"roblox"`, `"love"`, `"luajit"`, `"luau"`), `hasFiles`, `readFile`,
`writeFile`, `exists`; Roblox `toEditableImage(img)`, `meshPages(prim, opts?)`, `pageData(prim, page, opts?)`,
`toEditableMesh(prim, page?, opts?)` (a triangle primitive in pages of at most 20k triangles / 60k vertices, each an
EditableMesh; see the Hosts section of the guide); LÖVE `toImageData(img)`, `fromImageData(imageData)`,
@@ -105,7 +105,7 @@ EditableMesh; see the Hosts section of the guide); LÖVE `toImageData(img)`, `fr
On LuaJIT the host raises the trace limits at load (`jit.opt.start("maxtrace=8000", "maxmcode=65536")`): the big
decoders (CELT, VP8, H.264, MPEG-1) outgrow the defaults and fall back to the interpreter. Set
`_G.FORMATS_NO_JIT_TUNE = true` before requiring the library to leave the JIT settings alone.
`_G.ROSETTA_NO_JIT_TUNE = true` before requiring the library to leave the JIT settings alone.
## Also exported