Crates.io | vbsp |
lib.rs | vbsp |
version | |
source | src |
created_at | 2022-02-18 19:54:05.311766+00 |
updated_at | 2025-03-04 20:39:20.57025+00 |
description | Rust parser for valve bsp files. |
homepage | https://github.com/icewind1991/vbsp |
repository | https://github.com/icewind1991/vbsp |
max_upload_size | |
id | 534855 |
Cargo.toml error: | TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Rust parser for valve bsp files.
Currently supports bsp files from Counter Strike Source and Team Fortress 2, other source games using bsp version 19 or 20 might also work. Adding other sourcemod variants should be fairly straight forward and pull requests for them are welcome.
fn main() -> Result<(), vbsp::BspError> {
let data = std::fs::read("maps/cp_steel.bsp")?;
let bsp = vbsp::Bsp::read(&data)?;
println!("{:?}", bsp);
Ok(())
}
See vbsp-to-gltf or vbspviewer for some more examples of how to use the bsp data.
This project is adapted from the quake bsp parser and wouldn't be possible without information from the source engine wiki.