# spirv_cross
**Repository Path**: mirrors_servo/spirv_cross
## Basic Information
- **Project Name**: spirv_cross
- **Description**: Safe Rust wrapper around SPIRV-Cross
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-25
- **Last Updated**: 2026-02-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
spirv_cross
## Example
`spirv_cross` provides a safe wrapper around [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) for use with Rust. For example, here is a simple function to parse a SPIR-V module and compile it to HLSL and MSL:
```rust
extern crate spirv_cross;
use spirv_cross::{spirv, hlsl, msl, ErrorCode};
fn example(module: spirv::Module) -> Result<(), ErrorCode> {
// Compile to HLSL
let ast = spirv::Ast::::parse(&module)?;
println!("{}", ast.compile()?);
// Compile to MSL
let ast = spirv::Ast::::parse(&module)?;
println!("{}", ast.compile()?);
Ok(())
}
```
## License
This project is licensed under either of [Apache License, Version
2.0](LICENSE-APACHE) or [MIT license](LICENSE-MIT), at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this project by you, as defined in the Apache 2.0 license,
shall be dual licensed as above, without any additional terms or conditions.
See [CONTRIBUTING.md](CONTRIBUTING.md).