Parser for source engine material files
  • Rust 99.3%
  • Nix 0.7%
Find a file
2026-07-11 21:22:29 +02:00
.forgejo/workflows workflow updates 2025-06-02 20:11:22 +02:00
examples released vdf-reader 2023-12-21 20:42:40 +01:00
src clippy fixes 2026-07-11 20:39:23 +02:00
tests fix tests 2026-07-11 21:20:47 +02:00
.envrc vdf work 2023-12-15 00:19:33 +01:00
.gitignore LightMappedGeneric 2023-12-18 19:17:34 +01:00
Cargo.lock fix tests 2026-07-11 21:20:47 +02:00
Cargo.toml require 1.86 2026-07-11 21:22:29 +02:00
flake.lock flake updates 2026-07-11 20:38:53 +02:00
flake.nix flake updates 2026-07-11 20:38:53 +02:00
README.md add basic readme 2025-06-02 20:29:37 +02:00

vmt-parser

Parser for source engine material files.

Usage

use vmt_parser::from_str;
use std::fs::read_to_string;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let raw = read_to_string("material.vmt")?;
    let material = 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.