valve-keyvalue 1.0.3

A parser and serializer for the Valve KeyValue format (VMT/VDF).
Documentation
  • Coverage
  • 0%
    0 out of 40 items documented0 out of 13 items with examples
  • Size
  • Source code size: 85.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 764.12 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Gerg0Vagyok

valve-keyvalue

A parser and serializer for Valve's KeyValue format (VMT/VDF).

Installation

Add this to your Cargo.toml:

[dependencies]
valve-keyvalue = "1.0.3"

Usage

use valve_keyvalue::ValveKeyValue;
use valve_keyvalue::{Parse, Serialize};

#[test]
fn amain() {
	let input = r#"
		"LightmappedGeneric"
		{
			// Setting key-value pairs with or without quotes
			"$basetexture" "metal/citadel_wall"
			$surfaceprop metal
		}
	"#.to_string();

	let key_values = ValveKeyValue::parse(input, true).unwrap();
	println!("{}", key_values.serialize(false, 4).unwrap());
}

License

See LICENSE