4 To build Rusticl you need to satisfy the following build dependencies:
7 - ``rustfmt`` (highly recommended, but only *required* for CI builds
8 or when authoring patches)
10 - `LLVM <https://github.com/llvm/llvm-project/>`__ built with
11 ``libclc`` and ``-DLLVM_ENABLE_DUMP=ON``.
12 - `SPIRV-Tools <https://github.com/KhronosGroup/SPIRV-Tools>`__
13 - `SPIRV-LLVM-Translator
14 <https://github.com/KhronosGroup/SPIRV-LLVM-Translator>`__ for a
15 ``libLLVMSPIRVLib.so`` matching your version of LLVM, i.e. if you're
16 using LLVM 15 (``libLLVM.so.15``), then you need a
17 ``libLLVMSPIRVLib.so.15``.
19 The minimum versions to build Rusticl are:
24 - LLVM: 11.0.0 (recommended: 15.0.0)
25 - SPIRV-Tools: any version (recommended: v2022.3)
27 Afterwards you only need to add ``-Dgallium-rusticl=true -Dllvm=enabled
28 -Drust_std=2021`` to your build options.
30 Most of the code related to Mesa's C code lives inside ``/mesa``, with
31 the occasional use of enums, structs or constants through the code base.
33 If you need help ping ``karolherbst`` either in ``#dri-devel`` or
36 Also, make sure that before submitting code to verify the formatting is
37 in order. That can easily be done via ``git ls-files */{lib,app}.rs
40 When submitting Merge Requests or filing bugs related to Rusticl, make
41 sure to add the ``Rusticl`` label so people subscribed to that Label get
47 One issue you might come across is, that the Rust edition meson sets is
48 not right. This is a known `meson bug
49 <https://github.com/mesonbuild/meson/issues/10664>`__ and in order to
50 fix it, simply run ``meson configure $your_build_dir -Drust_std=2021``