M1 Users - How are you Cross Compiling?

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

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

    Rust FFI-binding of Opus.

  • Hmm; so those (as far as I understand it) are being generated from the audioopus_sys crate. I'm not sure how to identify what is setting them though, I'm looking around for a Makefile but I'm failing to spot it

  • zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

  • It seems like it might be related to an issue on their backlog related to passing the specific CPU arch or it might be the an upstream ordeal with "all targets that LLVM supports". Or something else entirely?

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • cross

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

  • As the title goes; I'm trying to cross compile a project from M1 to Armv7 (for a raspberry pi 4). On my x86 Macbook the cross toolkit worked without a hitch. I can't seem to find a working solution on my M1 machine though, and I'm fairly stuck -- hoping someone else has found a working solution they could share, or a push in the right direction from here.

  • podman

    Podman: A tool for managing OCI containers and pods.

  • Cross + Podman can't work, as volume mounting is broken

  • homebrew-macos-cross-toolchains

    macOS cross compiler toolchains

  • The messense/homebrew-macos-cross-toolchains gets me past ring but fails on another dependency I have, audiopus_sys:

  • opus

    Modern audio compression for the internet.

  • Got it, that makes sense -- thanks for the help! Another commenter pointed out some of those oddities in the flags; It looks like something opus is computing/setting in their makefile which the dependency is invoking.

  • homebrew-musl-cross

    Homebrew Formula for static-friendly musl-based GCC macOS-to-Linux cross-compilers

  • The musl-cross tap: https://github.com/FiloSottile/homebrew-musl-cross

  • 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
  • lima

    Linux virtual machines, with a focus on running containers

  • I also tried lima and it's great for running aarch64 Linux, but the steps for running x86-64 Linux were not fun and I wouldn't want that as part of my workflow. Maybe colima is better but I haven't tried it yet.

  • colima

    Container runtimes on macOS (and Linux) with minimal setup

  • I also tried lima and it's great for running aarch64 Linux, but the steps for running x86-64 Linux were not fun and I wouldn't want that as part of my workflow. Maybe colima is better but I haven't tried it yet.

  • cmake-rs

    Rust build dependency for running cmake

  • Opened https://github.com/alexcrichton/cmake-rs/pull/136 to make it easier without resorting to `CMAKE_TOOLCHAIN_FILE`.

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