Eternaltwin

Home | Tools

Rust

Official website | GitHub

A language empowering everyone to build reliable and efficient software.

Rust is the main language used by Eternaltwin. We use it for everything except the frontend (which is in TypeScript): clients to official server, database management, backend services, REST server, even project management.

Installation

⚠ Eternaltwin requires Rust 1.89.0 or above (see rust-version in the workspace Cargo.toml), using the 2024 edition.

It is recommended to follow the official installation guidelines and use the rustup tool to install Rust (even if your system provides it in its package manager).

  1. Windows-only prerequisite: If you use Windows, first make sure you have the Visual Studio Build Tools. In the installer, select the "Desktop development with C++" workload (it pulls in the MSVC compiler toolchain and a matching Windows SDK).
  2. Follow the instructions on rustup.rs.

Check your installation with rustup --version and rustc --version.

Project tools

Once Rust is installed, cargo can run the tools used throughout the workspace:

  • cargo xtask <subcommand>: entry point for project-specific tasks defined in the xtask crate (codegen, dns, docs, precompile, publish, release, backend).
  • cargo clippy --all-targets --all-features -- -D warnings: lint the workspace (settings in clippy.toml).
  • cargo fmt --all: format the workspace (settings in rustfmt.toml).
  • cargo upgrade --incompatible: upgrade Rust dependencies across the workspace. This requires cargo-edit, installed with cargo install cargo-edit.