14 releases (7 breaking)

0.9.0 Apr 5, 2024
0.8.0 Nov 21, 2023
0.7.4 Aug 14, 2023
0.7.3 Jun 21, 2023
0.2.5 Nov 12, 2022

#157 in Game dev

Download history 22/week @ 2024-01-19 4/week @ 2024-01-26 10/week @ 2024-02-09 19/week @ 2024-02-16 12/week @ 2024-02-23 6/week @ 2024-03-01 17/week @ 2024-03-08 7/week @ 2024-03-15 49/week @ 2024-03-29 194/week @ 2024-04-05

251 downloads per month
Used in gvas2json

MIT license

4.5MB
5K SLoC

gvas

The gvas crate is a Rust library that allows parsing of gvas save files.

Documentation

Crate documentation is published to docs.rs/gvas.

Save files

A gvas save file is a binary file format used by the Unreal Engine 4/5 (UE4/UE5) game engine to store persistent data such as player progress, game settings, and other game-related information.

Usage

The crate can be added to a Rust project as a dependency by running the command cargo add gvas.

Serde Support

This crate supports serde deserialization and serialization. To use serde with gvas, the serde feature must be enabled by running cargo add gvas --features serde.

Examples

The example code below demonstrates how to use the gvas crate to read a gvas save file. The GvasFile struct's read() method is used to parse the data from the file and produce a GvasFile struct.

use gvas::GvasFile;
use std::fs::File;

let mut file = File::open("save.sav")?;
let gvas_file = GvasFile::read(&mut file, GameVersion::Default);

println!("{:#?}", gvas_file);

The tests directory contains several tests that demonstrate how to use the crate to read and write gvas files.

Contributing

Please see the CONTRIBUTING document for guidelines on how to contribute to this project.

License

This library is distributed under the terms of the MIT license. See the LICENSE file for details.

Dependencies