#valve #key-value #txt #vmt #gameinfo

spigot

parser for valve's keyvalue file format (gameinfo.txt, vmt, etc.)

3 releases

0.1.2 Apr 16, 2022
0.1.1 Sep 26, 2021
0.1.0 Sep 25, 2021

#27 in #valve

BSD-2-Clause

7KB
156 lines

spigot

A parser for Valve's Key-Value format, used in vmt files, gameinfo.txt, etc.

Example:

use spigot::{from_str, Value};

fn main() {
    let gameinfo = spigot::from_str(include_str!("portal/gameinfo.txt"));

    assert_eq!(&gameinfo["GameInfo"]["game"], Value::String("Portal".to_string()));
}

No runtime deps