This page provides instructions on how to build the project from source.
This project is written in Rust. You also need to install the latest nightly Rust compiler. The recommended way to do so is through rustup.
When installing, make sure to pick nightly
and i686-pc-windows-gnu
as the default toolchain / target.
If you've already installed Rust, you also need to add the i686-pc-windows-gnu
target to be able to cross-compile to Wine/Windows.
rustup target add i686-pc-windows-gnu
To be able to link the final DLL, you also need GCC and binutils provided by the MinGW-w64 project. See their website or your distro's documentation on how to install the latest MinGW-w64.
Building the project is very simple. Cargo, Rust's package manager, will download and compile everything for you.
Simply run:
cargo build
And you're done. You can optionally append the --release
flag to build an optimized release build.
The built file is stored in target/i686-pc-windows-gnu/<debug or release>/d3d9.dll
.
Most D3D9 games are 32-bit. If you happen upon a 64-bit D3D9 game, you will have to build the DLL for the corresponding target.
First, add the 64-bit target with rustup
:
rustup target add x86_64-pc-windows-gnu
You can then build the DLL with:
cargo build --target x86_64-pc-windows-gnu