Conditional compilation to avoid cross compilation

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • cross

    “Zero setup” cross compilation and “cross testing” of Rust crates

  • I'm not sure who needs to see this, but I had been struggling with compile times using cross + Docker Desktop on Mac while working on a small personal project the past few days. Despite the whole project being fewer than 350 LOC between a few files, recompiling the project with any change was taking upwards of 2 minutes through cross. I went through the due diligence of reducing the number of dependencies, removing features and macros that I didn't need, not compiling in release mode, trying different file sharing implementations for Docker Desktop and with all of that combined the time dropped to around 1 minute and 30 seconds for an incremental build. Still far from ideal for a small personal project.

  • cargo-zigbuild

    Compile Cargo project with zig as linker

  • Perhaps you can try cargo-zigbuild, it uses zig-cc for cross-compilation instead of creating a container, so it should be much more lightweight on MacOS, without all the cost of virtualization and file sharing.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts