Barebones game engine. Home made passion project.
ποΈ VERY WIP π·
Notes | ||
---|---|---|
Compiler | rustc 1.77.2 | Download Link |
Platform | x86_64 Windows and Linux | may or may not compile on other platforms |
Graphics | Vulkan capable Hardware |
You also require an internet connection, to download dependencies from crates.io. You can vendor crates for offline use or download an archived repo from my website. Note that I make these archives sporadically, meaning they may not be up to date.
This engine is using various 3rd party libraries. Trying to build without these will most definitely result in diverse compile, linker and runtime errors. Depending on your platform, follow the instructions below.
In this repo you will find the ./external/
directory. It contains all required libraries. If you don't want to use the binaries in this repo, you can install the Vulkan SDK, which provides binaries for SDL2
and shaderc
.
*.dll
in ./external/bin/
to the root of this repository.These DLLs need to be available in your environment. So either assign it to your environment variables or move them to the root of the directory.
SHADERC_LIB_DIR
shaderc requires the DLL shaderc_shared.dll
during build time. shaderc
allows to store and compile shader code inside Rust source files. ris_engine
does not use this feature, but shaderc
requires this dependency regardless. It searches the DLL in SHADERC_LIB_DIR
.
For more info, check this link: https://docs.rs/shaderc/0.8.3/shaderc/index.html
So, if shaderc_shared.dll
sits inside directory /path/to/shaderc/
, then set SHADERC_LIB_DIR
to /path/to/shaderc/
. If you don't want to move the DLL, you can simply set SHADERC_LIB_DIR
to <path of this repo>/external/bin/
.
*.lib
in ./external/lib/
toC:\Users\<your username>\.rustup\toolchains\<current toolchain>\lib\rustlib\<current toolchain>\lib
Rust still needs to link. If you are using rustup
, the linker will search for LIBs in the directory above. If you are not using rustup
, you must figure out how to link against the required LIBs.
Examples use the pacman
package manager from Arch.
sudo pacman -S sdl2
sudo pacman -S shaderc
Depending on your graphics card, you need to install a different package. Follow the instructions in the link below:
https://wiki.archlinux.org/title/Vulkan#Installation
Assuming everything is installed correctly, you can now compile and run the engine with:
cargo run
Alternatively, you can build a release-ready package, by running the command below. Note that this builds with all optimizations enabled, which may take longer than just using cargo run
.
cargo run -p cli build
All tests are found under ./tests/
and can be run with:
cargo test
Alternatively, to run much more extensive tests, you can run the command below. Note that this may take several minutes.
cargo run -p cli pipeline all
For more info about the command cargo run -p cli
, see ./cli/README.md
.