The three DLLs beside the client were updated; re-measured each against the
thing with evidence behind it rather than against a wiki.
nampower's own string pool is exact — `^NP_[A-Za-z0-9]+$` is the CVar list and
`Usage:` the arity of every function — and both came back identical to this
tree: 49/49 CVars, 63/63 functions. The gap was events. Four built:
BUFF_ADDED_OTHER / BUFF_REMOVED_OTHER ui_aura.rs, AuraEdge::OtherBuff
KEY_DOWN / KEY_UP bindings.rs, key_event_code
The buff pair was argued against here before, on the cost of diffing the
helpful half of every streamed unit for events nothing registered. Answered
rather than overruled: both are gated on `has_listener`, which is the test
upstream now recommends over its own deprecated NP_Enable*Events CVars. The key
pair uses the client's own code table, which `chord::key_code` already held with
a comment saying it was the fact these events were blocked on.
UnitXP_SP3 is packed, so its contract comes from the wiki plus the call sites in
the installed addons — and those call sites exposed a live bug. Every
`UnitXP("target", …)` queued a SelectionRequest, but the mod selects INSIDE the
call and SuperCleveRoidMacros steps the cycle and reads `"target"` back on the
next line, fifty times in one Lua frame. Queued, every pass read the same unit
and the scan reported one enemy however many were there — truthy return, no
error. The pick now resolves in-call from a pool the app publishes
(`feed_unitxp_scan`), exactly the bargain TargetByName already strikes. All nine
target modes are built where four were; `behindThreshold` is real (the reach
feed publishes the angle now, not a verdict); `timer` rides the one timer queue;
`notify` reaches winit's user-attention request; `version`,
`performanceProfile` and a non-raising `debug` answer.
ClassicAPI carries its whole Lua addon gzipped in `.rsrc` — 173 files, a length
header then the bodies, keyed by the paths in its string pool — so the spec for
the installed build is on disk. `scripts/dll-surface.py --unpack` writes it out.
Read against a LIVE VM (not `UiScript::new()`, which is engine-only), the gap is
898 globals, and almost all of it is either a locale string or a subsystem this
client models differently. What is between those is now in
`compat/classic_api/shared_xml.rs`: the pure Blizzard_SharedXML helpers, in
1.12's grammar, from the shipped addon's own source. `tostringall` stays absent
on `tests/stdlib.rs`'s own rule.
The native half is mostly widget methods; intersected with what the corpus
actually calls it is four, of which three are built (`SetResizeBounds` over
1.12's own resize pair, `GetNormalFontObject` — which needed 1.12's missing
`GetTextFontObject` implemented first — and a bare `IsEquippedItem`) and
`SetMotionScriptsWhileDisabled` deliberately is not, because both its call sites
guard on it and the behaviour behind it does not exist here.
Also measured and recorded: every addon-load warning in grom's own logs is a
third-party optional dependency he has not installed or an addon's own packaging
bug, not a defect on this side. docs/ADDON_COMPAT.md has the table.
Ambiguity ceiling 4,956 -> 4,966, measured: nine for `feed_unitxp_scan` against
transform writers on non-networked lanes, one for the attention drain against a
system that also reads WinitWindows and neither writes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
100 lines
4.9 KiB
TOML
100 lines
4.9 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = ["crates/*"]
|
|
|
|
[workspace.package]
|
|
version = "0.2.0"
|
|
edition = "2021"
|
|
license = "MIT OR Apache-2.0"
|
|
authors = ["sam <samuv.eth@gmail.com>"]
|
|
|
|
# A version two crates share is pinned in `[workspace.dependencies]`; feature additions stay per
|
|
# crate. `image` stays per-crate: its consumers differ on default features, and a member cannot
|
|
# turn off default features that a workspace entry enables.
|
|
# `too_many_arguments` is off: a Bevy system's parameter list is its dependency declaration.
|
|
[workspace.lints.clippy]
|
|
too_many_arguments = "allow"
|
|
|
|
[workspace.dependencies]
|
|
anyhow = "1.0.102"
|
|
# bevy's default features spelled out without `audio`: `2d`, `3d` and `ui` each pull `bevy_audio`
|
|
# and `vorbis`, and the client mixes through kira. Add a feature by name, never `2d`/`3d`/`ui`; a
|
|
# plugin that takes bevy with its default features brings the audio stack back too.
|
|
bevy = { version = "0.18.1", default-features = false, features = [
|
|
"default_app",
|
|
"default_platform",
|
|
"2d_bevy_render",
|
|
"3d_bevy_render",
|
|
"ui_api",
|
|
"ui_bevy_render",
|
|
"scene",
|
|
"picking",
|
|
] }
|
|
# For the `WOW_GPU_MS` meter's query set, which bevy 0.18 does not wrap; must match bevy's wgpu.
|
|
wgpu = "27"
|
|
# For `UnitXP("notify", …)`'s window-manager attention request, which `bevy_winit` does not
|
|
# re-export (`window_attention.rs`); must match bevy_winit's winit, or the `WinitWindows` handle
|
|
# would belong to a different crate version.
|
|
winit = { version = "0.30", default-features = false }
|
|
clap = { version = "4.6.1", features = ["derive"] }
|
|
sha1 = "0.10.6"
|
|
|
|
# lua-src builds the addon VM's Lua 5.1.5, patched to accept exactly the 1.12 client's grammar;
|
|
# the hunks and the command that checks them: `third_party/lua-src/BENILLA.md`.
|
|
[patch.crates-io]
|
|
lua-src = { path = "third_party/lua-src" }
|
|
# kira 0.12.1, patched to compute spatial gains and the volume tween per output chunk and
|
|
# interpolate them, not per sample frame (`third_party/kira/BENILLA.md`).
|
|
kira = { path = "third_party/kira" }
|
|
# mlua-sys 0.10.0, patched so its Lua 5.1 traceback names a frame from `lua_getinfo`, as 5.1's own
|
|
# `debug.traceback` does, instead of searching the whole global table per stack level. mlua builds
|
|
# that traceback for every `Err` a Rust binding returns, which on this interface's 27,114 globals
|
|
# cost ~7 ms a raise — invisibly, for the raises an addon wraps in `pcall`: five a frame measured
|
|
# 44.7 ms of VM tick with an empty error log (`third_party/mlua-sys/BENILLA.md`).
|
|
mlua-sys = { path = "third_party/mlua-sys" }
|
|
# A lock-only stand-in: bevy_audio's unbuilt cpal 0.15 would otherwise hold `alsa-sys` 0.3 against
|
|
# cpal 0.17's 0.4, and a lock holds one `links = "alsa"` (`third_party/alsa-0.9/BENILLA.md`).
|
|
alsa = { path = "third_party/alsa-0.9" }
|
|
|
|
# Dependencies at opt-level 3 in dev: at opt-level 0, avian/parry collision drops a run to <1 fps.
|
|
# Line tables only, and never packed into the binary, for the reason under `[profile.dev]` below.
|
|
[profile.dev.package."*"]
|
|
opt-level = 3
|
|
debug = "line-tables-only"
|
|
split-debuginfo = "unpacked"
|
|
|
|
# Our crates at opt-level 1: Bevy's generic hot paths monomorphize into them, and at opt-level 0
|
|
# Stormwind drops from a pinned 60 fps to ~45; the warm incremental rebuild cost is ~0.
|
|
[profile.dev]
|
|
opt-level = 1
|
|
# Line tables only, not `debug = 2`. DWARF is ~97% of what rustc writes for this tree: the largest
|
|
# benilla-app codegen unit measured 145 MB, of which 61 MB was `.debug_str` and 13 MB
|
|
# `.debug_info` against 1.5 MB of `.text`. Carrying that cost a 1.5 GB `libbenilla_app` rlib, a
|
|
# 2.9 GB test binary and an 82 GB `target/debug`, which filled the disk on a 1 TB volume and made
|
|
# every write slower for it. `.debug_line` survives, so a panic backtrace and `gdb`'s `bt` still
|
|
# name a file and a line; `split-debuginfo` leaves the rest in the object files rather than copying
|
|
# it into the linked binary, which is what the link step paid for.
|
|
#
|
|
# This supersedes "no debuginfo trimming measures no recurring win", which was measured on macOS
|
|
# with sccache and no disk pressure. Re-measure on macOS before assuming it holds there.
|
|
debug = "line-tables-only"
|
|
split-debuginfo = "unpacked"
|
|
|
|
# The shipping build (`--profile ship`): fat LTO measures -1.0 cpu_ms (-5 %) against `release`,
|
|
# which stays the measured profile because fat LTO's link time would tax every iteration.
|
|
# `-Ctarget-cpu=native` is not set: it is not portable.
|
|
[profile.ship]
|
|
inherits = "release"
|
|
lto = "fat"
|
|
codegen-units = 1
|
|
|
|
# `release` plus incremental, run as `cargo play`: under `release` a one-line edit to
|
|
# `benilla-app` costs 2m47s. Incremental applies to workspace members only, so dependencies stay
|
|
# sccache-cacheable; it changes codegen, so it lives here and not in the measured `release`.
|
|
[profile.play]
|
|
inherits = "release"
|
|
incremental = true
|
|
# Not for speed: under `incremental`, thin-local LTO leaves promoted `anon.*.llvm.*` symbols
|
|
# unresolved and the link fails intermittently (rustc #86049).
|
|
lto = "off"
|