The following instructions guide you through building the aralez.exe executable for Windows. Aralez can be built directly on a Windows machine for native compatibility or cross-compiled on Linux. Please follow the steps relevant to your operating system.
Building on Windows #
Important: For compatibility with Windows 7 and Windows Server 2008, it is recommended to build Aralez on a Windows system. Additionally, using Rust version
1.77.0is necessary for compatibility with these legacy systems.
1. Install Rust #
- Ensure the Rust programming language toolchain is installed on your system. Rust can be installed by following the official guide at rust-lang.org.
- You may confirm the installation by running:
rustc --version- Version Requirement: If targeting Windows 7 and Windows Server 2008, set Rust to version
1.77.0to avoid compatibility issues. This can be done with the following command:
rustup default 1.77.02. Clone the Aralez Repository #
- Open a terminal or command prompt and navigate to the directory where you want to clone the repository.
- Run the following commands to clone the Aralez repository and enter its directory:
git clone https://github.com/abaghinyan/aralez.git
cd aralez3. Configure Aralez #
- Create a configuration file named
config.ymlin theconfigdirectory. - Use the
config_windows.yml.templatefile in the repository as a reference. Copy this template toconfig.ymland modify any necessary settings to match your requirements:
cp config/config_windows.yml.template config/config.yml- Open
config.ymlin a text editor to adjust the configuration as needed, such as specifying paths and options for data collection. For more information about the configuration, please refer to the Configuration section.
4. Build the Project #
- Once your environment and configurations are ready, initiate the build process using Cargo, Rust’s package manager and build system.
- To create a release build optimized for performance, run:
cargo build --releaseNote: This command compiles Aralez in « release » mode, which optimizes the binary for reduced size and faster execution.
5. Locate the Executable #
- After a successful build, the
aralez.exeexecutable will be located in thetarget/releasedirectory. You can find it using:
cd target/releaseCross-Compiling on Linux (Ubuntu) #
Warning: While cross-compiling on Linux allows you to build a Windows-compatible executable, it does not support the
i686-pc-windows-msvcorx86_64-pc-windows-msvctargets. Attempting to use these targets will result in an incompatibility with Windows 7. Instead, thei686-pc-windows-gnuandx86_64-pc-windows-gnutargets should be used.
1. Install Required Packages for Cross-Compilation: #
- To build a Windows-compatible executable on Linux, you need to install the
mingw-w64package, which provides the necessary tools for cross-compilation:
sudo apt update
sudo apt install mingw-w642. Install Rust #
- Follow the instructions at rust-lang.org to install Rust.
- Once Rust is installed, add the Windows cross-compilation targets:
rustup target add i686-pc-windows-gnu
rustup target add x86_64-pc-windows-gnuNote: These targets allow you to build 32-bit (
i686) and 64-bit (x86_64) Windows executables.
3. Clone the Aralez Repository #
- In a terminal, navigate to the directory where you want to download the Aralez repository.
- Clone the repository and enter its directory with:
git clone https://github.com/abaghinyan/aralez.git
cd aralez4. Configure Aralez #
- Similar to the Windows build, create a
config.ymlfile in theconfigdirectory, usingconfig_windows.yml.templateas a guide:
cp config/config_windows.yml.template config/config.yml- Open
config.ymlin a text editor and customize it according to your requirements. For more information about the configuration, please refer to the Configuration section.
5. Build the Project for Windows GNU Targets #
- To build Aralez for the 32-bit Windows GNU target, use:
cargo build --release --target i686-pc-windows-gnu- To build Aralez for the 64-bit Windows GNU target, use:
cargo build --release --target x86_64-pc-windows-gnu6. Locate the Executable #
- After building, the
aralez.exebinaries can be found in:
–target/i686-pc-windows-gnu/releasefor the 32-bit version
–target/x86_64-pc-windows-gnu/releasefor the 64-bit version - You can copy these files to a Windows system for testing or deployment.