1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Exports beside the textures, for the batch engine (`docs/DESIGN.md`
//! section 4's `unityrs-export` row): the `sprites` kind (E17, gate row
//! X2), the NGUI atlas cutter (`docs/plans/extract.md` E21 to E26, gate row
//! X5) and the JSON writer it writes with.
//!
//! - [`ngui::cut`]: one input's view to its Sprites' PNGs, its atlases'
//! crops (PNG), each atlas's JSON, the skips with their closed reasons and
//! the sheet-to-atlas units, as `docs/BATCH_SPEC.md` sections 3, 4.3, 4.4
//! and 5 say, the textures `outputs.textures` selects among them.
//! - [`ngui::winners`]: 4.5's steps 1 to 3 over the cuts of several inputs.
//! - [`keys`]: key templates, `safe()` and the key rules, which the
//! engine's validation checks a spec's templates and keys with.
//! - [`simple`]: metered single-object `TextAsset`, Font, MonoBehaviour JSON
//! (or raw fallback), and Tier X `VideoClip` resource payloads.
//! - [`shader::export`]: Tier A Shader text with metered platform-blob decoding.
//! - [`extractor`]: UnityPy's extraction order and names, typed reports,
//! and corrected `GameObject` crawls, through a caller's metered sink.
//! - [`pyjson`]: `CPython` 3.11's `json.dumps(value, indent=2)` of a typetree
//! value, byte for byte (E24).
//!
//! It is written from the specification, not ported from the Python
//! references (`tools/parity/ngui_cutter.py`, `tools/parity/sprites_kind.py`),
//! which record the fixtures it is tested against (`unityrs-testkit`'s
//! `tests/fixtures/ngui.json` and `tests/fixtures/sprites.json`). The
//! sprites kind's files port UnityPy 1.25.2's Sprite rules (MIT), as do
//! the reads' names a `Sprite` or a `Texture2D` cannot be given
//! (`ngui::read::SETTERLESS`), each saying so in its header, with the
//! notice in the crate's `LICENSE-UNITYPY`.
//! The cutter checks `max_attempt_evictions` itself, after each Environment
//! call (registration's included), and `max_export_work` through the
//! engine's [`ngui::Hooks::export_work`], as it does the stop, the decode
//! work and the memory budgets; their values, the spool and 4.6's prefix
//! conflicts are the engine's.
// No panics on an input's contents (docs/plans/core.md section 3.15), as in
// the core and the decoders. Tests may opt out.
pub use VorbisHeaders;
/// Key templates, `safe()` and the key rules (`docs/BATCH_SPEC.md` 2.1 to
/// 2.3), the engine's and the cutter's one copy: validation checks a spec's
/// templates and literal keys through it ([`keys::check_template`],
/// [`keys::check_prefixed`]), and an attempt expands and checks its keys.
pub use keys;