Parser for source engine material files
- Rust 99.3%
- Nix 0.7%
| .forgejo/workflows | workflow updates | |
| examples | released vdf-reader | |
| src | clippy fixes | |
| tests | fix tests | |
| .envrc | vdf work | |
| .gitignore | LightMappedGeneric | |
| Cargo.lock | fix tests | |
| Cargo.toml | require 1.86 | |
| flake.lock | flake updates | |
| flake.nix | flake updates | |
| README.md | add basic readme | |
vmt-parser
Parser for source engine material files.
Usage
usevmt_parser::from_str;usestd::fs::read_to_string;fn main()-> Result<(),Box<dynstd::error::Error>>{letraw=read_to_string("material.vmt")?;letmaterial=from_str(&raw)?;println!("texture: {}",material.base_texture());Ok(())}Material support
Because this crate focuses on extracting common rendering parameters from the materials, it only supports a fixed set of materials. If you need to parse a material that isn't supported by this crate, you can do a more manual parsing by using vdf-reader directly.