Release multi-target Rust applications with GitLab CI

Mike Ensor
8 min readFeb 5, 2022

TL;DR

  • Add host targets using rustup target add x86_64-pc-windows-gnu (any Rust Tier 1) to build multiple OS platform binaries. Cargo CLI flags to specify target in cargo <cmd> --target <host-platform> commands.
  • GitLab CI —Create a custom Rust build image to reduce build times and ensure consistency between builds.

--

--