11 releases

0.4.7 Feb 19, 2024
0.4.6 Feb 7, 2024
0.4.1 Jan 15, 2024
0.4.0 Jul 20, 2023
0.1.1-beta.3 Feb 4, 2023

#99 in Graphics APIs

Download history 290/week @ 2024-08-05 364/week @ 2024-08-12 1148/week @ 2024-08-19 408/week @ 2024-08-26 780/week @ 2024-09-02 799/week @ 2024-09-09 884/week @ 2024-09-16 1163/week @ 2024-09-23 1231/week @ 2024-09-30 145/week @ 2024-10-07 136/week @ 2024-10-14 312/week @ 2024-10-21 252/week @ 2024-10-28 292/week @ 2024-11-04 393/week @ 2024-11-11 437/week @ 2024-11-18

1,406 downloads per month
Used in 8 crates (via librashader-reflect)

MIT license

61MB
2.5M SLoC

C 2M SLoC // 0.1% comments C++ 80K SLoC // 0.2% comments Python 25K SLoC // 0.4% comments GNU Style Assembly 18K SLoC Rust 16K SLoC // 0.1% comments Happy 4.5K SLoC GLSL 3K SLoC // 0.2% comments Bitbake 1.5K SLoC LLVM 773 SLoC Lex 760 SLoC // 0.2% comments Forge Config 256 SLoC XSL 145 SLoC // 0.1% comments Shell 129 SLoC // 0.1% comments GraphQL 50 SLoC

spirv-to-dxil-rs

Safe Rust bindings to spirv-to-dxil.

Latest Version Docs License

Building

spirv-to-dxil-rs builds a copy of spirv-to-dxil statically from Mesa.

A script to clone a minimal subset of Mesa required to build spirv-to-dxil has been provided.

$ ./clone-mesa.sh
$ cargo build

Updating Mesa

Unless you are maintaining spirv-to-dxil-rs, you do not need to update Mesa frequently.

Updating Mesa requires Python 3.6 and mako to pre-generate templated files. CMake is also required to regenerate the Rust bindings from spirv-to-dxil.h, this is to ensure that bindings can be generated regardless of whether changes need to be made to the spirv-to-dxil-sys build script.

  1. Update the submodule to HEAD

    git submodule update --init --remote --depth 1 --single-branch --progress spirv-to-dxil-sys/native/mesa

  2. Re-apply sparse-checkout

    git submodule absorbgitdirs
    git -C spirv-to-dxil-sys/native/mesa config core.sparseCheckout true
    git -C spirv-to-dxil-sys/native/mesa config core.symlinks false
    cp spirv-to-dxil-sys/native/mesa-sparse-checkout .git/modules/spirv-to-dxil-sys/native/mesa/info/sparse-checkout
    git submodule foreach git sparse-checkout reapply
    
  3. Regenerate bindings

    cargo run --bin bindings_generator
    
  4. Regenerate mako-generated files for cc

    ./mesa_mako 
    

Dependencies