content: # Configuration for cross (https://github.com/rust-embedded/cross),
  # for easy cross compilation and testing
  
  # useful to pass these environment variables into the build environment from
  # the calling shell
  [build.env]
  passthrough = [
      "RUST_BACKTRACE",
      "RUST_LOG",
      "RUSTFLAGS",
  ]
  
  # For the targets below, override cross's default images with our own, since our
  # dependencies like snmalloc do not build successfuly there currently. So we
  # bring our own images with all the setup done for working builds.
  #
  # For details on the image implementation, refer to the contents of
  # packaging/builder-images directory.
  
  [target.x86_64-unknown-linux-musl]
  # has latest musl-cross-make (needed for snmalloc to compile)
  # fails currently on final linking even with modified snmalloc build script to
  # find static version of libatomic and libstdc++. With clang as the c++ compiler,
  # this works, but to keep this image simple, we don't use it for now.
  #
  # TODO check with snmalloc-rs folks to see if there's a way around the snmalloc
  # linking issues seen here.
  image = "tremorproject/tremor-builder:x86_64-unknown-linux-musl"
  
  # cross here is expected to be installed via (has fixes for this custom target to work):
  #   cargo install --git https://github.com/rust-embedded/cross.git
  [target.x86_64-alpine-linux-musl]
  xargo = false # cross uses xargo for non-standard targets normally, but we don't want that here
  # the before-mentioned linking issues (with x86_64-unknown-linux-musl) don't occur here,
  # when using alpine's patched rustc (https://git.alpinelinux.org/aports/tree/community/rust).
  image = "tremorproject/tremor-builder:x86_64-alpine-linux-musl"
  
  [target.x86_64-unknown-linux-gnu]
  image = "tremorproject/tremor-builder:x86_64-unknown-linux-gnu"
  # useful if we want to support additional build on debian for debian packages
  # (above image is centos7 based).
  #image = "tremorproject/tremor-builder:x86_64-unknown-linux-gnu.debian"
  