mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-28 23:17:46 +00:00
These are giant dependencies that for some reason pull in winapi(???) and we actually don't need all of their features. Criterion can be replaced with brunch, a minimalist alternative. walkdir is replaced with a single function. system-dep can be replaced with a single line. Eventually I would like to make it a little bit more than one line, but that's all we need for now.
25 lines
765 B
Rust
25 lines
765 B
Rust
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
use std::env;
|
|
|
|
use brunch::Bench;
|
|
use physis::common::Platform;
|
|
|
|
fn reload_repos() {
|
|
let game_dir = env::var("FFXIV_GAME_DIR").unwrap();
|
|
physis::gamedata::GameData::from_existing(Platform::Win32, format!("{}/game", game_dir).as_str()).unwrap();
|
|
}
|
|
|
|
fn fetch_data() {
|
|
let game_dir = env::var("FFXIV_GAME_DIR").unwrap();
|
|
let mut gamedata =
|
|
physis::gamedata::GameData::from_existing(Platform::Win32, format!("{}/game", game_dir).as_str()).unwrap();
|
|
|
|
gamedata.extract("exd/root.exl");
|
|
}
|
|
|
|
brunch::benches!(
|
|
Bench::new("gamedata reloading repositories").run(reload_repos),
|
|
Bench::new("gamedata extract").run(fetch_data),
|
|
);
|