Skip to content

Add MinGW (Windows 10+) Target - #580

Open
7d4d9e33 wants to merge 5 commits into
redlib-org:mainfrom
7d4d9e33:windoze
Open

7d4d9e33 wants to merge 5 commits into
redlib-org:mainfrom
7d4d9e33:windoze

Conversation

@7d4d9e33

@7d4d9e33 7d4d9e33 commented Sep 28, 2026 •

Copy link
Copy Markdown

I have implemented 64-bit Windows 10+ target support for Redlib via MinGW (x86_64-pc-windows-gnu).

To do this:

  1. Add the target to Rust:
rustup target add x86_64-pc-windows-gnu
  1. Install the cross-compilation dependencies (example is for Debian/Ubuntu):
sudo apt-get install --no-install-suggests --no-install-recommends -y \
  gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 nasm cmake
  1. Run the following command inside the redlib repository root:
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
CXX_x86_64_pc_windows_gnu=x86_64-w64-mingw32-g++ \
BINDGEN_EXTRA_CLANG_ARGS="-I$(x86_64-w64-mingw32-gcc -print-file-name=include)" \
cargo build --release --target x86_64-pc-windows-gnu

Ubuntu Note: If you encounter header conflicts between Clang and MinGW headers, append -nobuiltininc to the BINDGEN_EXTRA_CLANG_ARGS environment variable:
BINDGEN_EXTRA_CLANG_ARGS="-I$(x86_64-w64-mingw32-gcc -print-file-name=include) -nobuiltininc"

Once the build finishes, the output executable redlib.exe will be located in target/x86_64-pc-windows-gnu/release/.

Testing & Downloads

Suggestion: CI setup could be updated to publish compiled binaries in each push instead of putting it to release. For reference, ReSukiSU has an effective CI pipeline for publishing build artifacts directly on push without requiring a formal release tag.

yey, 64 bit windows build now available!
for mingw
try fix dependency problem
@7d4d9e33 7d4d9e33 changed the title Windoze Add MinGW (Windows 10+) Support Sep 28, 2026
@7d4d9e33 7d4d9e33 changed the title Add MinGW (Windows 10+) Support Add MinGW (Windows 10+) Target Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant