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
68
69
70
71
72
73
74
75
76
77
78
79
# SPDX-License-Identifier: BSD-3-Clause
#
# `whiteout` is taken on crates.io, so the published package is
# `whiteoutlib` — matching the C++ project name. The library keeps the
# short name (see [lib] below), so callers still write `use whiteout::…`.
[]
= "whiteoutlib"
= "Read and write Blizzard game assets from Rust: models (MDX, M2, M3), textures (BLP, DDS, PNG, JPEG, BMP, TGA, TIFF, GIF) and archives (CASC, MPQ)."
= ["wow", "warcraft", "starcraft", "mdx", "blp"]
= ["game-development", "parser-implementations"]
= "README.md"
= true
= true
# This crate is the sole owner of the whiteout native library. Cargo allows
# one provider of a given `links` name per graph, so a second crate that
# builds its own copy of the C++ is now a build error instead of ~1,551
# duplicate C++ symbols that the linker silently picks a winner for.
# Dependents link *this* library, using the metadata build.rs publishes
# (see its header) — `links` is also what makes that metadata visible.
= "whiteout_native"
= true
= true
= true
= true
= "https://docs.rs/whiteoutlib"
# What ships in the .crate. The vendored C++ tree is staged into `native/`
# by scripts/pack-rust.ps1 before packaging; in a plain checkout it is
# absent and build.rs falls back to the repository root instead.
#
# `native/` is gitignored, and cargo excludes gitignored paths unless they
# are named here — so this list is what makes the vendored build shippable.
# It must stay inside [package]: a section header above it would silently
# reparent the key and drop the C++ sources from the package.
= [
"src/**/*.rs",
# Shipped so the crate is self-verifying. The corpus sweeps skip
# themselves when the game assets are absent, which they are for
# anyone consuming this from crates.io.
"tests/**/*.rs",
"build.rs",
"README.md",
"LICENSE",
"native/**",
]
# Import path stays `whiteout` even though the package is `whiteoutlib`.
# Matching the two would be a one-line change here plus a rename at every
# `use` site.
[]
= "whiteout"
[]
# `vendored` builds the bundled C++ with CMake. On by default because
# whiteout_native is not a library anyone has installed system-wide, so
# without it `cargo build` cannot succeed unaided. Turn it off and set
# WHITEOUT_LIB_DIR (or install the library) to link a prebuilt one.
= ["vendored"]
= ["dep:cmake"]
# Optional format support. Under `vendored` these drive the CMake options;
# otherwise they must match how the prebuilt library was configured, or
# linking fails — deliberately, rather than silently missing symbols.
= []
= []
[]
[]
= { = "0.1", = true }
[]
# docs.rs has no native library and no C++ toolchain. build.rs detects
# DOCS_RS and skips the build entirely; documenting every feature keeps
# casc/mpq in the rendered docs.
[]
= true
= ["--cfg", "docsrs"]