Files
moonwell-client-core/third_party/lua-src/Cargo.toml
T
Sam Sung c49c201176 CVars refuse what 1.12.1's callbacks refuse; Lua arguments and numerals (#1286)
CVars and Lua arguments, each against the client's code:

- A CVar row carries the reference's refusing callback, run before the value is stored (`CVar::Set`, 0x63df7d): the video rows, six camera rows, `farclip` (NaN passes, as 0x688d40's unordered compare lets it), `frillDensity`, `gxTripleBuffer` (0 or 1, 0x63afe0) and `gxRefresh` (the 11 rates at 0x8645e0).
- `RegisterCVar` creates at most 30 CVars per process (0x488b25); `GetCVar` and `GetCVarDefault` raise their usage lines.
- `Minimap:SetMaskTexture`, `CloseLoot(1)` (ERR_LOOT_NO_UI, 0x48f27b) and the onSelf of `UseContainerItem`/`UseInventoryItem` follow the client.
- Lua's numeral reader has no hex and takes `d` as an exponent, as the client's strtod (0x4112d1).

Each has a test that fails without it.

Fixes #558
Fixes #559
Fixes #567
Fixes #696
Fixes #988
Fixes #989
Fixes #1025
Fixes #302
Fixes #366
Fixes #1275

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:20:23 +07:00

33 lines
1.5 KiB
TOML

# A fork of the `lua-src` crate (MIT, github.com/mlua-rs/lua-src-rs), pinned to the version mlua
# 0.11 asks for, carrying one deliberate change to the Lua 5.1.5 sources it compiles.
#
# Why it exists: the 1.12 addon corpus is written for Lua 5.0 and uses the iterator-less
# generic-for (`for k, v in someTable do`) in 183 of 218 addons. Lua 5.1 deleted the opcode that
# made it work, so on stock 5.1 it raises `attempt to call a table value`, the first error for 60 of
# 218 addons. No Lua-side shim can restore an opcode. The fork stays on 5.1.5 and restores that one
# opcode's 5.0 behaviour, which Lua shipped as "for compatibility only", so every other 5.1 fix and
# mlua's whole surface stay intact.
#
# What changes: `BENILLA.md` lists every hunk against upstream's `lua-5.1.5/` tree
# (ten, in five files) and the one command that verifies the sources against the registry copy.
#
# The crate's own `src/lib.rs` is upstream's, with Lua 5.2 to 5.5 stripped from the `Version` enum
# and their trees deleted, so asking for another version is a compile error here rather than a
# missing directory at build time.
[package]
name = "lua-src"
version = "550.0.0"
authors = ["Aleksandr Orlenko <zxteam@protonmail.com>"]
edition = "2024"
repository = "https://github.com/mlua-rs/lua-src-rs"
license = "MIT"
description = """
Sources of Lua 5.1 and logic to build them — benilla's fork, see the header and BENILLA.md.
"""
[features]
ucid = [] # accept UniCode IDentifiers (upstream's; inert here, it only ever gated 5.4/5.5)
[dependencies]
cc = "1.2"