Building is supported on macOS, Windows, and Linux/WSL.
You will need:
- Git
- System-native C++ toolchain (needed for linking Rust binaries)
- LLVM (needed for generating Rust -> C bindings for SMB2)
Install Xcode command line tools:
xcode-select --installFollow the bindgen instructions for installing LLVM.
Install Git for Windows.
Follow the bindgen instructions for installing LLVM. On Windows on ARM, you may need to use the installer directly instead of winget.
Set the LIBCLANG_PATH environment variable to C:\Program Files\LLVM\lib (or to wherever you installed LLVM).
Install GCC and LLVM:
sudo apt update
sudo apt install build-essential libclang-devInstall the base Rust toolchain.
On Windows, follow the installer's instructions for installing Visual Studio correctly.
git clone https://github.com/ComplexPlane/SMB2PracticeMod.git
cd SMB2PracticeModRun one of:
cargo xtask: Standard build that producestarget/SMB2PracticeMod.gci.cargo xtask debug: Build that includes file/line/column panic debug information. This is very helpful for debugging crashes, but isn't the default as it significantly increases the binary size.
If you get an error when the nightly toolchain is installing, you may need to remove some conflicting nightly toolchains and try again. Use rustup toolchain list to list the toolchains, and rustup toolchain uninstall <toolchain> to remove them.