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.0
is 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.0
to avoid compatibility issues. This can be done with the following command:
rustup default 1.77.0
2. 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 aralez
3. Configure Aralez #
- Create a configuration file named
config.yml
in theconfig
directory. - Use the
config.yml.template
file in the repository as a reference. Copy this template toconfig.yml
and modify any necessary settings to match your requirements:
cp config/config.yml.template config/config.yml
- Open
config.yml
in 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 --release
Note: 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.exe
executable will be located in thetarget/release
directory. You can find it using:
cd target/release
Cross-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-msvc
orx86_64-pc-windows-msvc
targets. Attempting to use these targets will result in an incompatibility with Windows 7. Instead, thei686-pc-windows-gnu
andx86_64-pc-windows-gnu
targets should be used.
1. Install Required Packages for Cross-Compilation: #
- To build a Windows-compatible executable on Linux, you need to install the
mingw-w64
package, which provides the necessary tools for cross-compilation:
sudo apt update
sudo apt install mingw-w64
2. 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-gnu
Note: 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 aralez
4. Configure Aralez #
- Similar to the Windows build, create a
config.yml
file in theconfig
directory, usingconfig.yml.template
as a guide:
cp config/config.yml.template config/config.yml
- Open
config.yml
in 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-gnu
6. Locate the Executable #
- After building, the
aralez.exe
binaries can be found in:
–target/i686-pc-windows-gnu/release
for the 32-bit version
–target/x86_64-pc-windows-gnu/release
for the 64-bit version - You can copy these files to a Windows system for testing or deployment.