yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
62325bb42
master
Slang LLVM/Clang Library
The purpose of this project is to use the LLVM/Clang infrastructure to provide features for the Slang language compiler.
These features may include
- Use as a replacement for a file based downstream C++ compiler for CPU targets
- Allow the 'host-callable' to generate in memory executable code directly
- Allow parsing of C/C++ code
- Compile Slang code to bitcode
- JIT execution of bitcode
Currently only executing code via 'host-callable' mechanism is supported.
How to use
If the slang-llvm shared library/dll is available to Slang, Slang will automatically use LLVM JIT for host-callable compilations.
Limitiations
- Only supports
host-callable
Building LLVM/Clang
This repo's external/build-llvm.sh script builds llvm with the correct
options to be used by slang, please refer to that.
1Slang LLVM/Clang Library 2======================== 3 4The purpose of this project is to use the [LLVM/Clang infrastructure](https://github.com/shader-slang/llvm-project/) to provide features for the [Slang language compiler](https://github.com/shader-slang/slang/). 5 6These features may include 7 8* Use as a replacement for a file based downstream C++ compiler for CPU targets 9* Allow the 'host-callable' to generate in memory executable code directly 10* Allow parsing of C/C++ code 11* Compile Slang code to bitcode 12* JIT execution of bitcode 13 14Currently only executing code via 'host-callable' mechanism is supported. 15 16How to use 17========== 18 19If the `slang-llvm` shared library/dll is available to Slang, Slang will automatically use LLVM JIT for `host-callable` compilations. 20 21Limitiations 22============ 2324 * Only supports `host-callable` 25 26Building LLVM/Clang 27=================== 28 29This repo's `external/build-llvm.sh` script builds llvm with the correct 30options to be used by slang, please refer to that.