Skip to main content

Crate wows_data_mgr

Crate wows_data_mgr 

Source
Expand description

Test helper API for accessing downloaded World of Warships game data.

Use these functions in integration tests to get VFS access to game builds. Tests should skip gracefully when game data is unavailable.

§Example

use wows_data_mgr::{available_builds, vfs_for_build};

#[test]
fn test_game_params_load() {
    let builds = available_builds();
    if builds.is_empty() {
        eprintln!("Skipping: no game data available");
        return;
    }
    for build in builds {
        let vfs = vfs_for_build(build).unwrap();
        // test with vfs...
    }
}

Modules§

builds
Master builds index (builds.toml) and per-build metadata.
cas
Content-addressed storage for deduplicated VFS file storage.
cas_vfs
A read-only [vfs::FileSystem] backed by a build manifest and the shared content-addressed store. Resolves a path to a content hash via the manifest (metadata.files) and serves the bytes from common/ab/hash, so a build is readable with no symlinked vfs/ tree.
constants
Fetch versioned game constants from the padtrack/wows-constants GitHub repo.
dump
manifest
registry

Structs§

Dump
A dump directory resolved for reading, whichever on-disk layout it uses.

Constants§

LOG_TARGET
The tracing target every log statement in this crate is emitted under.

Functions§

available_builds
Returns sorted list of locally available build numbers.
dump_for_build
Resolves a build number to a readable Dump.
game_data_dir
Returns the path to the game_data/ directory.
game_dir_for_build
Returns the game root path for a specific build.
latest_build
Returns the latest available build number and its VFS.
vfs_for_build
Constructs a VFS for a specific build.