Building RaiMS and Rai MD API source and Windows cross build

Both Windows installers on the download page are built on Linux (Fedora) with the mingw-w64 cross compiler from the public sources below. The same trees build natively on Linux with plain make, and the whole chain is also published as rpms on COPR (dnf copr enable injinj/rel).

Source repositories

PackageGitHubWhat it is
raimsraitechnology/raims RaiMS: ms_server, ms_gen_key, the Windows service wrapper raisvc (win/), installer script win/raims.nsi
raimdapiinjinj/raimdapi Rai MD API: C++ / C / .NET / Java bindings, raisub2 & friends, installer script win/raimdapi.nsi
Sibling libraries, linked in statically (cloned automatically by deps.sh):
raikvraitechnology/raikvevent loop, shared memory kv, the Windows epoll/socket shim (src/win.c)
raimdraitechnology/raimdmarket data message formats (RV, TIB, SASS, JSON, …)
sassrvraitechnology/sassrvRendezvous protocol, rvd compatible client and the rv7 api
natsmdraitechnology/natsmdNATS protocol
raidsraitechnology/raidsRedis protocol
ommraitechnology/ommRWF / OMM message support (raimdapi)
libdecnumberraitechnology/libdecnumberdecimal arithmetic
openpgmraitechnology/openpgm (branch rai)PGM multicast (raims)
h3, linecook, rdbparserraitechnology/h3, injinj/linecook, injinj/rdbparser geo index, console line editing, redis rdb parsing (raims)

Each repo's build_depends.mak names its sibling dependencies and minimum versions; it is the single source for both the rpm BuildRequires and deps.sh. Repos are laid out as siblings in one directory (../raikv/include, ../raikv/FC43_x86_64-mingw/lib64 are what the makefiles expect).

Build host

Fedora 43 x86_64 was used for the published builds; any recent Fedora with the mingw-w64 packages should do:

# cross compiler, static runtime libraries the link needs, NSIS for the installer, zip
sudo dnf install mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static mingw64-pcre2-static \
                 mingw64-c-ares mingw64-openssl mingw64-zlib mingw-nsis-base zip git make
# optional bindings for raimdapi
sudo dnf install dotnet-sdk-9.0            # .NET programs and RaiApi2.dll   (dotnet=1)
sudo dnf install java-21-openjdk-devel     # java jars and the JNI dlls      (java=1, the default)

The .NET programs are published by the Linux SDK for win-x64 (framework dependent, needs the .NET 9 runtime on Windows). The java classes are compiled with --release 21; the JNI dlls are cross compiled with the host JDK's headers.

Cross build for Windows

mkdir rai && cd rai
git clone https://github.com/raitechnology/raims
git clone https://github.com/injinj/raimdapi

# clone the siblings and build everything in dependency order, for Windows
( cd raims    && ./deps.sh -b port_extra=-mingw )
( cd raimdapi && ./deps.sh -b port_extra=-mingw dotnet=1 )

# package: zip + setup.exe under <repo>/FC43_x86_64-mingw/dist/
( cd raims    && make port_extra=-mingw dist_win )
( cd raimdapi && make port_extra=-mingw dotnet=1 dist_win )

deps.sh without -b only clones; -n shows the order without doing anything. Extra arguments are passed to every make. port_extra=-mingw selects x86_64-w64-mingw32-gcc and puts objects under <dist>_x86_64-mingw/ next to the native <dist>_x86_64/ tree, so both builds coexist in one checkout. dist_win strips the exes, renames the dlls to the names the Windows loaders look for (raimdapi.dll, jraiapi2.dll), copies the mingw runtime dlls, zips, and runs makensis on win/*.nsi when it is installed (zip only otherwise).

Output:

raims/FC43_x86_64-mingw/dist/raims-<ver>-win64.zip        raims-<ver>-win64-setup.exe
raimdapi/FC43_x86_64-mingw/dist/raimdapi-<ver>-win64.zip  raimdapi-<ver>-win64-setup.exe

The version (1.52.0-109 = version 1.52.0, build 109) is set in each repo's .copr/Makefile (major_num / minor_num / patch_num / build_num), the same file the rpm builds use.

Native Linux build

( cd raims    && ./deps.sh -b )          # binaries in raims/FC43_x86_64/bin
( cd raimdapi && ./deps.sh -b dotnet=1 )  # raisub2 draisub2 jraisub2 ... in raimdapi/FC43_x86_64/bin
make -C raims dist_rpm                    # or: rpm packages, same as the COPR builds

Native builds need the usual devel packages (pcre2-devel c-ares-devel openssl-devel zlib-devel, plus java-21-openjdk-devel / dotnet-sdk-9.0 for the bindings). Prebuilt rpms for Fedora, RHEL/Rocky and friends: dnf copr enable injinj/rel && dnf install raims (raimdapi rpms are being added to the same COPR).

Notes

Updated 2026-09-04. Back to the Windows downloads.