Showing preview only (1,099K chars total). Download the full file or copy to clipboard to get everything.
Repository: cross-rs/cross
Branch: main
Commit: 588b3c99db52
Files: 361
Total size: 1016.6 KB
Directory structure:
gitextract_3cdscn2l/
├── .cargo/
│ └── config.toml
├── .changes/
│ ├── 1006.json
│ ├── 1018.json
│ ├── 1023.json
│ ├── 1024.json
│ ├── 1028-1132.json
│ ├── 1032.json
│ ├── 1033.json
│ ├── 1038-1220-1482.json
│ ├── 1039.json
│ ├── 1049-1142.json
│ ├── 1054.json
│ ├── 1057.json
│ ├── 1063-1125-1134.json
│ ├── 1073.json
│ ├── 1078.json
│ ├── 1084.json
│ ├── 1085.json
│ ├── 1105.json
│ ├── 1112.json
│ ├── 1118.json
│ ├── 1123.json
│ ├── 1138.json
│ ├── 1159.json
│ ├── 1160.json
│ ├── 1164.json
│ ├── 1166.json
│ ├── 1183.json
│ ├── 1199.json
│ ├── 1207.json
│ ├── 1220.json
│ ├── 1246.json
│ ├── 1248.json
│ ├── 1260.json
│ ├── 1265.json
│ ├── 1271.json
│ ├── 1280.json
│ ├── 1317.json
│ ├── 1325.json
│ ├── 1330-1349.json
│ ├── 1333.json
│ ├── 1340.json
│ ├── 1342.json
│ ├── 1346.json
│ ├── 1348.json
│ ├── 1373.json
│ ├── 1374-1490.json
│ ├── 1385.json
│ ├── 1391.json
│ ├── 1399.json
│ ├── 1403-1411.json
│ ├── 1420.json
│ ├── 1458.json
│ ├── 1465.json
│ ├── 1466.json
│ ├── 1468.json
│ ├── 1481.json
│ ├── 1483.json
│ ├── 1485.json
│ ├── 1488.json
│ ├── 1489.json
│ ├── 1491.json
│ ├── 1494.json
│ ├── 1495.json
│ ├── 1525.json
│ ├── 1540.json
│ ├── 1557.json
│ ├── 1574.json
│ ├── 1623.json
│ ├── 1625.json
│ ├── 1630.json
│ ├── 1641.json
│ ├── 1647.json
│ ├── 1651.json
│ ├── 1664.json
│ ├── 1674.json
│ ├── 1681.json
│ ├── 554.json
│ ├── 589.json
│ ├── 591-1095.json
│ ├── 661.json
│ ├── 817.json
│ ├── 880-1111.json
│ ├── 918.json
│ ├── 931.json
│ ├── 934.json
│ ├── 937.json
│ ├── 939.json
│ ├── 942.json
│ ├── 945.json
│ ├── 947.json
│ ├── 952.json
│ ├── 955.json
│ ├── 956.json
│ ├── 957-1393.json
│ ├── 962.json
│ ├── 964.json
│ ├── 968.json
│ ├── 974.json
│ ├── 982.json
│ ├── 984.json
│ ├── 987.json
│ ├── 989.json
│ ├── 994.json
│ ├── README.md
│ └── template/
│ ├── 940.json
│ ├── 978.json
│ ├── 979-981.json
│ ├── CHANGELOG.md
│ └── issue440.json
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── ISSUE_TEMPLATE/
│ │ ├── a_blank_issue.md
│ │ ├── b_issue_report.yml
│ │ ├── config.yml
│ │ └── z_feature_request.yml
│ ├── actions/
│ │ ├── cargo-install-upload-artifacts/
│ │ │ └── action.yml
│ │ ├── cargo-llvm-cov/
│ │ │ └── action.yml
│ │ ├── cargo-publish/
│ │ │ └── action.yml
│ │ ├── post/
│ │ │ ├── action.yml
│ │ │ └── main.js
│ │ └── setup-rust/
│ │ ├── action.yml
│ │ └── rust.json
│ ├── bors.toml
│ ├── codecov.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── changelog.yml.x
│ ├── ci.yml
│ ├── try.yml
│ └── weekly.yml
├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── ci/
│ ├── build_release.sh
│ ├── shared.sh
│ ├── test-bisect.sh
│ ├── test-cross-image.sh
│ ├── test-docker-in-docker.sh
│ ├── test-foreign-toolchain.sh
│ ├── test-podman.sh
│ ├── test-remote.sh
│ ├── test-zig-image.sh
│ └── test.sh
├── clippy.toml
├── crosstool-ng/
│ ├── arm-unknown-linux-gnueabihf.config.in
│ ├── loongarch64-unknown-linux-gnu.config.in
│ └── loongarch64-unknown-linux-musl.config.in
├── deny.toml
├── docker/
│ ├── .dockerignore
│ ├── .gitattributes
│ ├── Dockerfile.aarch64-linux-android
│ ├── Dockerfile.aarch64-unknown-freebsd
│ ├── Dockerfile.aarch64-unknown-linux-gnu
│ ├── Dockerfile.aarch64-unknown-linux-gnu.centos
│ ├── Dockerfile.aarch64-unknown-linux-musl
│ ├── Dockerfile.aarch64_be-unknown-linux-gnu
│ ├── Dockerfile.arm-linux-androideabi
│ ├── Dockerfile.arm-unknown-linux-gnueabi
│ ├── Dockerfile.arm-unknown-linux-gnueabihf
│ ├── Dockerfile.arm-unknown-linux-musleabi
│ ├── Dockerfile.arm-unknown-linux-musleabihf
│ ├── Dockerfile.armv5te-unknown-linux-gnueabi
│ ├── Dockerfile.armv5te-unknown-linux-musleabi
│ ├── Dockerfile.armv7-linux-androideabi
│ ├── Dockerfile.armv7-unknown-linux-gnueabi
│ ├── Dockerfile.armv7-unknown-linux-gnueabihf
│ ├── Dockerfile.armv7-unknown-linux-musleabi
│ ├── Dockerfile.armv7-unknown-linux-musleabihf
│ ├── Dockerfile.asmjs-unknown-emscripten
│ ├── Dockerfile.cross
│ ├── Dockerfile.i586-unknown-linux-gnu
│ ├── Dockerfile.i586-unknown-linux-musl
│ ├── Dockerfile.i686-linux-android
│ ├── Dockerfile.i686-pc-windows-gnu
│ ├── Dockerfile.i686-unknown-freebsd
│ ├── Dockerfile.i686-unknown-linux-gnu
│ ├── Dockerfile.i686-unknown-linux-musl
│ ├── Dockerfile.loongarch64-unknown-linux-gnu
│ ├── Dockerfile.loongarch64-unknown-linux-musl
│ ├── Dockerfile.mips-unknown-linux-gnu
│ ├── Dockerfile.mips-unknown-linux-musl
│ ├── Dockerfile.mips64-unknown-linux-gnuabi64
│ ├── Dockerfile.mips64-unknown-linux-muslabi64
│ ├── Dockerfile.mips64el-unknown-linux-gnuabi64
│ ├── Dockerfile.mips64el-unknown-linux-muslabi64
│ ├── Dockerfile.mipsel-unknown-linux-gnu
│ ├── Dockerfile.mipsel-unknown-linux-musl
│ ├── Dockerfile.native
│ ├── Dockerfile.native.centos
│ ├── Dockerfile.powerpc-unknown-linux-gnu
│ ├── Dockerfile.powerpc64-unknown-linux-gnu
│ ├── Dockerfile.powerpc64le-unknown-linux-gnu
│ ├── Dockerfile.riscv64gc-unknown-linux-gnu
│ ├── Dockerfile.riscv64gc-unknown-linux-musl
│ ├── Dockerfile.s390x-unknown-linux-gnu
│ ├── Dockerfile.sparc64-unknown-linux-gnu
│ ├── Dockerfile.sparcv9-sun-solaris
│ ├── Dockerfile.thumbv6m-none-eabi
│ ├── Dockerfile.thumbv7em-none-eabi
│ ├── Dockerfile.thumbv7em-none-eabihf
│ ├── Dockerfile.thumbv7m-none-eabi
│ ├── Dockerfile.thumbv7neon-linux-androideabi
│ ├── Dockerfile.thumbv7neon-unknown-linux-gnueabihf
│ ├── Dockerfile.thumbv8m.base-none-eabi
│ ├── Dockerfile.thumbv8m.main-none-eabi
│ ├── Dockerfile.thumbv8m.main-none-eabihf
│ ├── Dockerfile.wasm32-unknown-emscripten
│ ├── Dockerfile.x86_64-linux-android
│ ├── Dockerfile.x86_64-pc-solaris
│ ├── Dockerfile.x86_64-pc-windows-gnu
│ ├── Dockerfile.x86_64-unknown-dragonfly
│ ├── Dockerfile.x86_64-unknown-freebsd
│ ├── Dockerfile.x86_64-unknown-illumos
│ ├── Dockerfile.x86_64-unknown-linux-gnu
│ ├── Dockerfile.x86_64-unknown-linux-gnu.centos
│ ├── Dockerfile.x86_64-unknown-linux-musl
│ ├── Dockerfile.x86_64-unknown-netbsd
│ ├── Dockerfile.zig
│ ├── aarch64-linux-gnu-glibc.sh
│ ├── android/
│ │ ├── README.md
│ │ ├── android/
│ │ │ ├── __init__.py
│ │ │ ├── make.py
│ │ │ ├── soong.py
│ │ │ └── util.py
│ │ ├── pyproject.toml
│ │ ├── scripts/
│ │ │ └── build-system.py
│ │ ├── tests/
│ │ │ ├── Addition.bp
│ │ │ ├── Android.bp
│ │ │ ├── Android.mk
│ │ │ ├── Comments.mk
│ │ │ ├── Empty.bp
│ │ │ ├── Empty.mk
│ │ │ ├── FakeTitle.mk
│ │ │ ├── Grouped.mk
│ │ │ ├── ListMap.bp
│ │ │ ├── Multiline.mk
│ │ │ ├── Nested.mk
│ │ │ ├── NonTest.bp
│ │ │ ├── README.md
│ │ │ ├── Single.mk
│ │ │ ├── test_make.py
│ │ │ ├── test_metadata.py
│ │ │ ├── test_soong.py
│ │ │ └── test_util.py
│ │ └── tox.ini
│ ├── android-ndk.sh
│ ├── android-runner
│ ├── android-symlink.sh
│ ├── android-system.sh
│ ├── android.cmake
│ ├── apt-cross-essential.sh
│ ├── base-runner.sh
│ ├── cmake.sh
│ ├── common.sh
│ ├── cross.sh
│ ├── crosstool-config/
│ │ ├── aarch64_be-unknown-linux-gnu.config
│ │ ├── arm-unknown-linux-gnueabihf.config
│ │ ├── loongarch64-unknown-linux-gnu.config
│ │ ├── loongarch64-unknown-linux-musl.config
│ │ └── riscv64gc-unknown-linux-musl.config
│ ├── crosstool-ng.sh
│ ├── deny-debian-packages.sh
│ ├── dragonfly.sh
│ ├── dropbear.sh
│ ├── emscripten.sh
│ ├── freebsd-common.sh
│ ├── freebsd-extras.sh
│ ├── freebsd-fetch-best-mirror.sh
│ ├── freebsd-gcc.sh
│ ├── freebsd-install-package.sh
│ ├── freebsd-install.sh
│ ├── freebsd-setup-packagesite.sh
│ ├── freebsd.sh
│ ├── illumos.sh
│ ├── lib.sh
│ ├── linux-image.sh
│ ├── linux-runner
│ ├── mingw.sh
│ ├── musl-gcc.sh
│ ├── musl-symlink.sh
│ ├── musl.sh
│ ├── native-linux-image.sh
│ ├── native-linux-runner
│ ├── native-qemu.sh
│ ├── netbsd.sh
│ ├── qemu-runner
│ ├── qemu.sh
│ ├── solaris.sh
│ ├── tidyup.sh
│ ├── toolchain.cmake
│ ├── validate-android-args.sh
│ ├── windows-entry.sh
│ ├── wine.sh
│ └── zig.sh
├── docs/
│ ├── cargo_configuration.md
│ ├── config_file.md
│ ├── custom_images.md
│ ├── environment_variables.md
│ ├── getting-started.md
│ ├── recipes.md
│ ├── remote.md
│ └── unstable_features.md
├── rustfmt.yml
├── src/
│ ├── bin/
│ │ ├── commands/
│ │ │ ├── clean.rs
│ │ │ ├── containers.rs
│ │ │ ├── images.rs
│ │ │ ├── mod.rs
│ │ │ └── run.rs
│ │ ├── cross-util.rs
│ │ └── cross.rs
│ ├── build.rs
│ ├── cargo.rs
│ ├── cli.rs
│ ├── config.rs
│ ├── cross_toml.rs
│ ├── docker/
│ │ ├── build.rs
│ │ ├── custom.rs
│ │ ├── engine.rs
│ │ ├── image.rs
│ │ ├── local.rs
│ │ ├── mod.rs
│ │ ├── provided_images.rs
│ │ ├── remote.rs
│ │ ├── seccomp.json
│ │ └── shared.rs
│ ├── errors.rs
│ ├── extensions.rs
│ ├── file.rs
│ ├── id.rs
│ ├── interpreter.rs
│ ├── lib.rs
│ ├── rustc.rs
│ ├── rustup.rs
│ ├── shell.rs
│ ├── temp.rs
│ ├── tests/
│ │ ├── rustup.rs
│ │ └── toml.rs
│ └── tests.rs
├── targets.toml
└── xtask/
├── Cargo.toml
└── src/
├── build_docker_image.rs
├── changelog.rs
├── ci/
│ └── target_matrix.rs
├── ci.rs
├── codegen.rs
├── crosstool.rs
├── hooks.rs
├── install_git_hooks.rs
├── main.rs
├── pre-commit.sh
├── pre-push.sh
├── target_info.rs
├── target_info.sh
└── util.rs
================================================
FILE CONTENTS
================================================
================================================
FILE: .cargo/config.toml
================================================
[alias]
xtask = ["run", "-p", "xtask", "--"]
build-docker-image = ["xtask", "build-docker-image"]
================================================
FILE: .changes/1006.json
================================================
{
"type": "added",
"description": "add CentOS7-compatible target for aarch64",
"issues": [528]
}
================================================
FILE: .changes/1018.json
================================================
{
"description": "deny installation of armhf debian packages for the arm-unknown-linux-gnueabihf target.",
"type": "fixed"
}
================================================
FILE: .changes/1023.json
================================================
{
"description": "support different Android NDK, API, and Android versions using Docker build args.",
"type": "added"
}
================================================
FILE: .changes/1024.json
================================================
{
"description": "`rust-std` is no longer downloaded when using `build-std = true`",
"type": "fixed",
"breaking": false
}
================================================
FILE: .changes/1028-1132.json
================================================
[
{
"description": "link to libgcc for armv5te-unknown-linux-musleabi.",
"type": "fixed"
},
{
"description": "add C++ support for FreeBSD targets.",
"type": "added"
},
{
"description": "test dynamic library support for Android targets in CI.",
"type": "internal"
},
{
"description": "test partial C++ support for mips64el-unknown-linux-muslabi64 in CI.",
"type": "internal"
},
{
"description": "convert mips64el-unknown-linux-muslabi64 to a hard-float toolchain to match the rust target.",
"type": "changed",
"breaking": true
},
{
"description": "convert mips64el-unknown-linux-muslabi64 to use the mips64r2 architecture, identical to the rust target.",
"type": "changed",
"breaking": true
},
{
"description": "convert mips-unknown-linux-musl and mipsel-unknown-linux-musl to use the mips32r2 architecture, identical to the rust targets.",
"type": "changed",
"breaking": true
}
]
================================================
FILE: .changes/1032.json
================================================
{
"description": "allow disabling buildkit for container engines lacking buildkit support.",
"type": "added"
}
================================================
FILE: .changes/1033.json
================================================
{
"description": "fix --cache-from using podman.",
"type": "fixed",
"issues": [1031]
}
================================================
FILE: .changes/1038-1220-1482.json
================================================
[
{
"description": "bump MSRV to 1.77.2",
"type": "internal"
}
]
================================================
FILE: .changes/1039.json
================================================
{
"description": "support overlay and fuse-overlayfs storage drivers",
"type": "added"
}
================================================
FILE: .changes/1049-1142.json
================================================
{
"type": "changed",
"description": "stop parsing arguments to `cross run` after `--`",
"issues": [1048, 1141]
}
================================================
FILE: .changes/1054.json
================================================
{
"type": "internal",
"description": "change the unique container ID to be unique based off the toolchain and system time."
}
================================================
FILE: .changes/1057.json
================================================
{
"description": "fix mount paths outside of the workspace mount directory on Windows and those provided as a WSL path.",
"type": "fixed",
"issues": [1145, 1156]
}
================================================
FILE: .changes/1063-1125-1134.json
================================================
[
{
"type": "changed",
"description": "changed musl targets to use static-pie linkage by default, consistent with Alpine.",
"breaking": true
},
{
"type": "fixed",
"description": "fixed C++ support for musl targets.",
"issues": [902],
"breaking": true
},
{
"type": "fixed",
"description": "use a linker script for musl libstdc++ to ensure the archive links to libc, libm, and libgcc as needed.",
"issues": [1124]
}
]
================================================
FILE: .changes/1073.json
================================================
{
"type": "added",
"description": "passthrough cross environment variables by default"
}
================================================
FILE: .changes/1078.json
================================================
{
"type": "fixed",
"description": "Fix custom image names for images with a trailing '-' character.\ncustom images in packages with the `^[^0-9-].*([^A-Za-z_]*-)|(-[^A-Za-z_]*)$` package name pattern are now supported.",
"issues": [1077]
}
================================================
FILE: .changes/1084.json
================================================
{
"type": "fixed",
"description": "fixed remote docker data volume paths on windows",
"issues": [1081]
}
================================================
FILE: .changes/1085.json
================================================
{
"type": "added",
"description": "support custom toolchains without rustup."
}
================================================
FILE: .changes/1105.json
================================================
{
"type": "changed",
"description": "explicitly prefer `-ar` to `-gcc-ar`.",
"issues": [1100]
}
================================================
FILE: .changes/1112.json
================================================
[
{
"description": "fixed CMake support for Android and newlib targets.",
"type": "fixed",
"issues": [1110]
},
{
"description": "added C++ support for newlib targets.",
"type": "added"
}
]
================================================
FILE: .changes/1118.json
================================================
{
"type": "added",
"description": "added ARMv8-M newlib targets.",
"issues": [1116]
}
================================================
FILE: .changes/1123.json
================================================
{
"description": "support external C/C++ dependencies using C11/C++11 threads for MinGW targets by switching linkers from `*-gcc` to `*gcc-posix`.",
"type": "added",
"issues": [1122],
"breaking": true
}
================================================
FILE: .changes/1138.json
================================================
{
"description": "explicitly specify ar for all toolchains",
"type": "changed",
"issues": [1137]
}
================================================
FILE: .changes/1159.json
================================================
{
"type": "changed",
"description": "use `[workspace.metadata.cross]` as an alternative to `Cross.toml`"
}
================================================
FILE: .changes/1160.json
================================================
{
"type": "changed",
"description": "don't warn when toolchain version is explicitly provided.",
"issues": [1148]
}
================================================
FILE: .changes/1164.json
================================================
{
"type": "internal",
"description": "add fallback mirrors for FreeBSD packages.",
"issues": [1162]
}
================================================
FILE: .changes/1166.json
================================================
{
"description": "freebsd: include memstat in build image to fix build with libc 0.2.138 and up.",
"type": "fixed"
}
================================================
FILE: .changes/1183.json
================================================
{
"description": "resolve issue when using `pre-build` and `image.toolchain` in `Cargo.toml`",
"type": "fixed",
"issues": [1182]
}
================================================
FILE: .changes/1199.json
================================================
{
"type": "fixed",
"description": "use current target_dir path when copying build artifacts back",
"issues": [1103]
}
================================================
FILE: .changes/1207.json
================================================
{
"type": "fixed",
"description": "properly copy directories when using `CROSS_REMOTE`",
"issues": [1206]
}
================================================
FILE: .changes/1220.json
================================================
{
"type": "fixed",
"description": "don't pass `--target-dir` in remote context when it's not needed",
"issues": [1218]
}
================================================
FILE: .changes/1246.json
================================================
{
"description": "fix support for bare metal targets other than thumb",
"type": "fixed"
}
================================================
FILE: .changes/1248.json
================================================
{
"description": "customize `--cache-from` and `--cache-to` options for `build-docker-image`",
"type": "internal"
}
================================================
FILE: .changes/1260.json
================================================
{
"description": "fix podman bind mounts on macOS by removing SELinux labels.",
"issues": [756],
"type": "fixed",
"breaking": false
}
================================================
FILE: .changes/1265.json
================================================
{
"description": "replace `ctrlc` signal handler with `signal-hook`",
"type": "changed"
}
================================================
FILE: .changes/1271.json
================================================
{
"description": "add aarch64-unknown-freebsd image.",
"type": "added",
"breaking": false
}
================================================
FILE: .changes/1280.json
================================================
{
"description": "Allow to run arbitrary commands in containers using `cross-util run ...`",
"issues": [1266],
"type": "added",
"breaking": false
}
================================================
FILE: .changes/1317.json
================================================
{
"description": "Re-add PKG_CONFIG_PATH for the arm-unknown-linux-gnueabihf target.",
"issues": [1316],
"type": "fixed",
"breaking": false
}
================================================
FILE: .changes/1325.json
================================================
{
"description": "create CACHEDIR.TAG during custom docker build",
"type": "fixed",
"issues": [1324]
}
================================================
FILE: .changes/1330-1349.json
================================================
{
"description": "update cargo-zigbuild from 0.17.2 to 0.17.3",
"type": "changed"
}
================================================
FILE: .changes/1333.json
================================================
{
"description": "set arm-unknown-linux-gnueabihf to use glibc 2.31",
"type": "changed"
}
================================================
FILE: .changes/1340.json
================================================
{
"description": "don't error when a non-provided target is used with only a dockerfile specified",
"type": "fixed"
}
================================================
FILE: .changes/1342.json
================================================
[
{
"description": "fix `--list` showing cross commands for the host",
"type": "fixed"
},
{
"description": "add `rustdoc` as a supported cargo subcommand",
"type": "added"
}
]
================================================
FILE: .changes/1346.json
================================================
{
"description": "bump musl to 1.2.3, like done in rust 1.71",
"type": "changed"
}
================================================
FILE: .changes/1348.json
================================================
{
"description": "add `libexecinfo.so` in netbsd",
"type": "added"
}
================================================
FILE: .changes/1373.json
================================================
{
"type": "fixed",
"description": "fix wineboot silently failing on qemu",
"issues": [1372]
}
================================================
FILE: .changes/1374-1490.json
================================================
{
"type": "changed",
"description": "update wine to 9.0.0.0",
"issues": [1372]
}
================================================
FILE: .changes/1385.json
================================================
{
"description": "Set PKG_CONFIG_PATH in the FreeBSD Dockerfile.",
"issues": [1384],
"type": "fixed"
}
================================================
FILE: .changes/1391.json
================================================
{
"type": "fixed",
"description": "Add `-idirafter/usr/include` to bindgen's clang invocation on GNU/Linux",
"issues": [1389]
}
================================================
FILE: .changes/1399.json
================================================
{
"description": "fix creating `initrd` when using debian `ports` mirror and compressed kernel modules",
"issues": [1399],
"type": "fixed"
}
================================================
FILE: .changes/1403-1411.json
================================================
[{
"type": "fixed",
"description": "switch to freebsd 13.2 following 12.4 EoL",
"issues": [1390]
},
{
"type": "added",
"description": "Added helper script `/freebsd-install-package.sh` and friends to install freebsd packages, see [wiki](https://github.com/cross-rs/cross/wiki/FAQ#custom-images)"
}]
================================================
FILE: .changes/1420.json
================================================
{
"description": "set the required environment variables in the runner",
"type": "fixed"
}
================================================
FILE: .changes/1458.json
================================================
{
"description": "add gfortran for target *-gnu*, *-musl*, *-freebsd*, *-solaris*, *-dragonfly*, *-illumos*, *-netbsd*",
"issues": [1457],
"type": "added"
}
================================================
FILE: .changes/1465.json
================================================
{
"type": "added",
"description": "add loongarch64 support",
"issues": [1404]
}
================================================
FILE: .changes/1466.json
================================================
{
"type": "added",
"description": "Upgrade qemu and integrate qemu-user runners for loongarch64-linux-gnu",
"issues": [1467]
}
================================================
FILE: .changes/1468.json
================================================
{
"type": "changed",
"description": "use defconfig for ct-ng, minimizing the config",
"issues": [1335]
}
================================================
FILE: .changes/1481.json
================================================
{
"description": "allow pass-through environment variables to contain numbers",
"type": "fixed"
}
================================================
FILE: .changes/1483.json
================================================
{
"description": "Fix paths when using `CROSS_CONTAINER_IN_CONTAINER`",
"type": "fixed"
}
================================================
FILE: .changes/1485.json
================================================
{
"description": "Use `/proc/self/mountinfo` as a fallback for `docker inspect` if using `HOSTNAME` fails",
"issues": [1321],
"type": "changed"
}
================================================
FILE: .changes/1488.json
================================================
{
"description": "Allow `build-std` to take an array of crate names",
"issues": [896],
"type": "changed",
"breaking": true
}
================================================
FILE: .changes/1489.json
================================================
{
"description": "Simplify config internals",
"type": "internal"
}
================================================
FILE: .changes/1491.json
================================================
{
"description": "Allow specifying only a tag or subtarget for images in config",
"issues": [1169],
"type": "changed"
}
================================================
FILE: .changes/1494.json
================================================
{
"description": "Fix `zig.image` precedence",
"type": "fixed",
"breaking": true
}
================================================
FILE: .changes/1495.json
================================================
{
"description": "Fix `*-solaris` targets",
"issues": [1424],
"type": "fixed",
"breaking": true
}
================================================
FILE: .changes/1525.json
================================================
{
"description": "Fix riscv64gc-unknown-linux-gnu target",
"issues": [1423],
"type": "fixed"
}
================================================
FILE: .changes/1540.json
================================================
{
"description": "Upgrade the crosstool for the loongarch64-unknown-linux-gnu target",
"issues": [1538],
"type": "fixed"
}
================================================
FILE: .changes/1557.json
================================================
{
"type": "added",
"description": "add loongarch64-linux-musl support",
"issues": [1556]
}
================================================
FILE: .changes/1574.json
================================================
{
"type": "fixed",
"description": "`dockerfile` path is now relative to cargo workspace root"
}
================================================
FILE: .changes/1623.json
================================================
{
"type": "fixed",
"description": "fixed an issue where cross would look for metadata.cross outside the workspace"
}
================================================
FILE: .changes/1625.json
================================================
{
"description": "bump ct-ng to 1.27.0",
"type": "changed"
}
================================================
FILE: .changes/1630.json
================================================
{
"type": "added",
"description": "Add docker platform support for `linux/arm64/v8` target for many Ubuntu-based targets"
}
================================================
FILE: .changes/1641.json
================================================
{
"description": "Update binutils to 2.38 in illumos and solaris",
"issues": [1639],
"type": "changed"
}
================================================
FILE: .changes/1647.json
================================================
{
"description": "use `-q` when gathering the installed toolchains",
"issues": [1645],
"type": "fixed"
}
================================================
FILE: .changes/1651.json
================================================
{
"description": "Fix BINDGEN_EXTRA_CLANG_ARGS for x86_64-unknown-illumos",
"issues": [1644],
"type": "fixed",
"breaking": false
}
================================================
FILE: .changes/1664.json
================================================
{
"type": "added",
"description": "add riscv64gc-unknown-linux-musl support",
"issues": [1197]
}
================================================
FILE: .changes/1674.json
================================================
{
"type": "fixed",
"description": "use zstd to extract the compressed file as FreeBSD do so. also, bump the gcc version"
}
================================================
FILE: .changes/1681.json
================================================
{
"description": "also recognize active and default as installed toolchains",
"issues": [1645, 1678],
"type": "fixed"
}
================================================
FILE: .changes/554.json
================================================
{
"type": "fixed",
"description": "add the `--force-non-host` flag for newer rustup versions",
"issues": [536]
}
================================================
FILE: .changes/589.json
================================================
{
"type": "fixed",
"description": "Ensure podman builds use non-interactive package installs.",
"issues": [589]
}
================================================
FILE: .changes/591-1095.json
================================================
[
{
"description": "update Ubuntu images to 20.04 LTS.",
"type": "changed",
"breaking": true,
"issues": [417, 517, 556, 616]
},
{
"description": "remove Linux image from `mips-unknown-linux-gnu`.",
"type": "removed",
"breaking": true
},
{
"type": "changed",
"description": "upgraded most linux images to use a 5.x kernel instead of a 4.x kernel.",
"breaking": true
},
{
"type": "changed",
"description": "updated powerpc64, riscv64, and sparc64 `*-linux-gnu` images to use a 6.x kernel instead of a 4.x kernel.",
"breaking": true,
"issues": [1094]
}
]
================================================
FILE: .changes/661.json
================================================
{
"description": "When cross has given a warning, it will now quit instead of continuing with `cargo` when run in CI or with `CROSS_NO_WARNINGS=1`",
"breaking": true,
"type": "changed"
}
================================================
FILE: .changes/817.json
================================================
[
{
"description": "Images can now specify a certain toolchain via `target.{target}.image.toolchain`",
"breaking": true,
"type": "added"
},
{
"description": "made `cross +channel` parsing more compliant to parsing a toolchain",
"type": "fixed"
},
{
"description": "`pre-build` and `dockerfile` now uses buildx/buildkit",
"breaking": true,
"type": "changed"
}
]
================================================
FILE: .changes/880-1111.json
================================================
{
"description": "added a zig-based image (v0.10.0), allowing multiple targets to be built from the same image, using cargo-zigbuild (v0.14.1).",
"type": "added",
"issues": [860, 1109]
}
================================================
FILE: .changes/918.json
================================================
{
"description": "use JSON-based files to autogenerate CHANGELOG.md",
"issues": [662],
"type": "internal"
}
================================================
FILE: .changes/931.json
================================================
{
"description": "deny installation of debian packages that conflict with our cross-compiler toolchains.",
"type": "fixed"
}
================================================
FILE: .changes/934.json
================================================
{
"type": "added",
"description": "add support for pre-build hooks with remote docker",
"issues": [928]
}
================================================
FILE: .changes/937.json
================================================
{
"type": "fixed",
"description": "support Windows-style and absolute manifest paths",
"issues": [935]
}
================================================
FILE: .changes/939.json
================================================
{
"type": "changed",
"description": "Remove `/project` mounting, instead always mount in the same path as on the host",
"issues": [938]
}
================================================
FILE: .changes/942.json
================================================
[
{
"description": "use non-canonical paths for mount locations.",
"type": "changed",
"issues": [920]
},
{
"description": "fixed DeviceNS drive parsing in creating WSL-style paths on windows.",
"type": "fixed"
},
{
"description": "fixed the environment variable name for mounted volumes.",
"type": "fixed"
}
]
================================================
FILE: .changes/945.json
================================================
{
"type": "fixed",
"description": "fix pre-build hook image naming with podman",
"issues": [944]
}
================================================
FILE: .changes/947.json
================================================
[
{
"type": "internal",
"description": "resolve symlinks to cargo and xargo home before mounting",
"issues": [373]
},
{
"type": "fixed",
"description": "mount cargo, xargo, and the sysroot at the same path as on the host to avoid unnecessary recompilation.",
"issues": [551]
}
]
================================================
FILE: .changes/952.json
================================================
{
"description": "run non-x86 binaries natively if on a compatible host.",
"type": "added"
}
================================================
FILE: .changes/955.json
================================================
{
"description": "Update QEMU to version 7.0.0 for Ubuntu targets",
"type": "changed",
"breaking": false
}
================================================
FILE: .changes/956.json
================================================
{
"description": "use Wine from Ubuntu 20.04 WineHQ repo",
"type": "changed",
"breaking": false
}
================================================
FILE: .changes/957-1393.json
================================================
{
"description": "use latest Debian kernel images",
"type": "changed",
"breaking": false
}
================================================
FILE: .changes/962.json
================================================
{
"description": "fix SELinux labels to allow use in multiple containers and/or the host filesystem.",
"type": "fixed",
"issues": [961]
}
================================================
FILE: .changes/964.json
================================================
{
"type": "fixed",
"description": "don't keep stdin open when running containers."
}
================================================
FILE: .changes/968.json
================================================
{
"description": "only print rustup --verbose if `-vv` or `CROSS_VERBOSE=1` is used",
"type": "fixed"
}
================================================
FILE: .changes/974.json
================================================
[
{
"description": "change `mips64-unknown-linux-muslabi64` target to hard-float target.",
"type": "fixed",
"issues": [906]
},
{
"description": "build static libgcc and link to static libgcc for `mips64-unknown-linux-muslabi64` target.",
"type": "fixed"
}
]
================================================
FILE: .changes/982.json
================================================
{
"type": "internal",
"description": "use generic dockerfiles for when the toolchain and image platfom match."
}
================================================
FILE: .changes/984.json
================================================
{
"description": "added linux images for `riscv64gc-unknown-linux-gnu` to allow full system emulation.",
"type": "added"
}
================================================
FILE: .changes/987.json
================================================
{
"type": "fixed",
"description": "link to libgcc for `armv5te-unknown-linux-musleabi` to fix missing `__sync_X_and_fetch` builtins.",
"issues": [367]
}
================================================
FILE: .changes/989.json
================================================
{
"type": "changed",
"description": "add default nix_store value to solve nix-related issues",
"issues": [260]
}
================================================
FILE: .changes/994.json
================================================
{
"type": "fixed",
"description": "fixed wrong path used for target when pre-building in container in container mode",
"issues": [993]
}
================================================
FILE: .changes/README.md
================================================
# Changes
This stores changes to automatically generate the changelog, to avoid merge conflicts. Files should be in a JSON format, with the following format:
```json
{
"description": "single-line description to add to the CHANGELOG.",
"issues": [894],
"type": "added",
"breaking": false
}
```
Valid types are:
- added (Added)
- changed (Changed)
- fixed (Fixed)
- removed (Removed)
- internal (Internal)
`breaking` is optional and defaults to false. if `breaking` is present for any active changes, a `BREAKING:` notice will be added at the start of the entry. `issues` is also optional, and is currently unused, and is an array of issues fixed by the PR, and defaults to an empty array.
The file numbers should be `${pr}.json`. The `pr` is optional, and if not, an issue number should be used, in the `_${issue}.json` format. We also support multiple PRs per entry, using the `${pr1}-${pr2}-(...).json` format.
If multiple changes are made in a single PR, you can also pass an array of entries:
```json
[
{
"description": "this is one added entry.",
"issues": [630],
"type": "added"
},
{
"description": "this is another added entry.",
"issues": [642],
"type": "added"
},
{
"description": "this is a fixed entry that has no attached issue.",
"type": "fixed"
}
]
```
See [template](/.changes/template) for sample object and array-based changes.
================================================
FILE: .changes/template/940.json
================================================
[
{
"description": "this is one added entry.",
"issues": [630],
"type": "added"
},
{
"description": "this is another added entry.",
"issues": [642],
"type": "added"
},
{
"description": "this is a fixed entry that has no attached issue.",
"type": "fixed"
},
{
"description": "this is a breaking change.",
"issues": [679],
"breaking": true,
"type": "changed"
}
]
================================================
FILE: .changes/template/978.json
================================================
{
"description": "sample description for a PR adding one CHANGELOG entry.",
"issues": [437],
"type": "fixed"
}
================================================
FILE: .changes/template/979-981.json
================================================
{
"description": "this has 2 PRs associated.",
"issues": [441],
"type": "added"
}
================================================
FILE: .changes/template/CHANGELOG.md
================================================
# Change Log
This is a template changelog. This represents an older state of this repository, used to test parsing/formatting.
<!-- next-header -->
## [Unreleased] - ReleaseDate
### Added
- #905 - added `qemu-runner` for musl images, allowing use of native or emulated runners.
- #905 - added qemu emulation to `i586-unknown-linux-gnu`, `i686-unknown-linux-musl`, and `i586-unknown-linux-gnu`, so they can run on an `x86` CPU, rather than an `x86_64` CPU.
- #900 - add the option to skip copying build artifacts back to host when using remote cross via `CROSS_REMOTE_SKIP_BUILD_ARTIFACTS`.
- #891 - support custom user namespace overrides by setting the `CROSS_CONTAINER_USER_NAMESPACE` environment variable.
- #890 - support rootless docker via the `CROSS_ROOTLESS_CONTAINER_ENGINE` environment variable.
- #878 - added an image `ghcr.io/cross-rs/cross` containing cross.
### Changed
- #869 - ensure cargo configuration environment variable flags are passed to the docker container.
- #859 - added color diagnostic output and error messages.
### Fixed
- #905 - fixed running dynamically-linked libraries for all musl targets except `x86_64-unknown-linux-musl`.
- #904 - ensure `cargo metadata` works by using the same channel.
- #904 - fixed the path for workspace volumes and passthrough volumes with docker-in-docker.
- #898 - fix the path to the mount root with docker-in-docker if mounting volumes.
- #897 - ensure `target.$(...)` config options override `build` ones when parsing strings and vecs.
- #895 - convert filenames in docker tags to ASCII lowercase and ignore invalid characters
- #885 - handle symlinks when using remote docker.
- #868 - ignore the `CARGO` environment variable.
- #867 - fixed parsing of `build.env.passthrough` config values.
## [v0.2.2] - 2022-06-24
### Added
- #803 - added `CROSS_CUSTOM_TOOLCHAIN` to disable automatic installation of components for use with tools like `cargo-bisect-rustc`
- #795 - added images for additional toolchains maintained by cross-rs.
- #792 - added `CROSS_CONTAINER_IN_CONTAINER` environment variable to replace `CROSS_DOCKER_IN_DOCKER`.
- #785 - added support for remote container engines through data volumes through setting the `CROSS_REMOTE` environment variable. also adds in utility commands to create and remove persistent data volumes.
- #782 - added `build-std` config option, which builds the rust standard library from source if enabled.
- #678 - Add optional `target.{target}.dockerfile[.file]`, `target.{target}.dockerfile.context` and `target.{target}.dockerfile.build-args` to invoke docker/podman build before using an image.
- #678 - Add `target.{target}.pre-build` config for running commands before building the image.
- #772 - added `CROSS_CONTAINER_OPTS` environment variable to replace `DOCKER_OPTS`.
- #767, #788 - added the `cross-util` and `xtask` commands.
- #842 - Add `Cargo.toml` as configuration source
- #745 - added `thumbv7neon-*` targets.
- #741 - added `armv7-unknown-linux-gnueabi` and `armv7-unknown-linux-musleabi` targets.
- #721 - add support for running doctests on nightly if `CROSS_UNSTABLE_ENABLE_DOCTESTS=true`.
- #719 - add `--list` to known subcommands.
- #681 - Warn on unknown fields and confusable targets
- #624 - Add `build.default-target`
- #647 - Add `mips64-unknown-linux-muslabi64` and `mips64el-unknown-linux-muslabi64` support
- #543 - Added environment variables to control the UID and GID in the container
- #524 - docker: Add Nix Store volume support
- Added support for mounting volumes.
- #684 - Enable cargo workspaces to work from any path in the workspace, and make path dependencies mount seamlessly. Also added support for private SSH dependencies.
### Changed
- #838 - re-enabled the solaris targets.
- #807 - update Qemu to 6.1.0 on images using Ubuntu 18.04+ with python3.6+.
- #775 - forward Cargo exit code to host
- #762 - re-enabled `x86_64-unknown-dragonfly` target.
- #747 - reduced android image sizes.
- #746 - limit image permissions for android images.
- #377 - update WINE versions to 7.0.
- #734 - patch `arm-unknown-linux-gnueabihf` to build for ARMv6, and add architecture for crosstool-ng-based images.
- #709 - Update Emscripten targets to `emcc` version 3.1.10
- #707, #708 - Set `BINDGEN_EXTRA_CLANG_ARGS` environment variable to pass sysroot to `rust-bindgen`
- #696 - bump freebsd to 12.3
- #629 - Update Android NDK version and API version
- #497 - don't set RUSTFLAGS in aarch64-musl image
- #492 - Add cmake to FreeBSD images
- #748 - allow definitions in the environment variable passthrough
### Fixed
- #836 - write a `CACHEDIR.TAG` when creating the target directory, similar to `cargo`.
- #804 - allow usage of env `CARGO_BUILD_TARGET` as an alias for `CROSS_BUILD_TARGET`
- #792 - fixed container-in-container support when using podman.
- #781 - ensure `target.$(...)` config options override `build` ones.
- #771 - fix parsing of `DOCKER_OPTS`.
- #727 - add `PKG_CONFIG_PATH` to all `*-linux-gnu` images.
- #722 - boolean environment variables are evaluated as truthy or falsey.
- #720 - add android runner to preload `libc++_shared.so`.
- #725 - support `CROSS_DEBUG` and `CROSS_RUNNER` on android images.
- #714 - use host target directory when falling back to host cargo.
- #713 - convert relative target directories to absolute paths.
- #501 (reverted, see #764) - x86_64-linux: lower glibc version requirement to 2.17 (compatible with centos 7)
- #500 - use runner setting specified in Cross.toml
- #498 - bump linux-image version to fix CI
- Re-enabled `powerpc64-unknown-linux-gnu` image
- Re-enabled `sparc64-unknown-linux-gnu` image
- #582 - Added `libprocstat.so` to FreeBSD images
- #665 - when not using [env.volumes](https://github.com/cross-rs/cross#mounting-volumes-into-the-build-environment), mount project in /project
- #494 - Parse Cargo's --manifest-path option to determine mounted docker root
### Removed
- #718 - remove deb subcommand.
### Internal
- #856 - remove use of external wslpath and create internal helper that properly handles UNC paths.
- #828 - assume paths are Unicode and provide better error messages for path encoding errors.
- #787 - add installer for git hooks.
- #786, #791 - Migrate build script to rust: `cargo build-docker-image $TARGET`
- #730 - make FreeBSD builds more resilient.
- #670 - Use serde for deserialization of Cross.toml
- Change rust edition to 2021 and bump MSRV for the cross binary to 1.58.1
- #654 - Use color-eyre for error reporting
- #658 - Upgrade dependencies
- #652 - Allow trying individual targets via bors.
- #650 - Improve Docker caching.
- #609 - Switch to Github Actions and GHCR.
- #588 - fix ci: bump openssl version in freebsd again
- #552 - Added CHANGELOG.md automation
- #534 - fix image builds with update of dependencies
- #502 - fix ci: bump openssl version in freebsd
- #489 - Add support for more hosts and simplify/unify host support checks
- #477 - Fix Docker/Podman links in README
- #476 - Use Rustlang mirror for Sabotage linux tarballs
- Bump nix dependency to `0.22.1`
- Bump musl version to 1.1.24.
## [v0.2.1] - 2020-06-30
- Disabled `powerpc64-unknown-linux-gnu` image.
- Disabled `sparc64-unknown-linux-gnu` image.
- Disabled `x86_64-unknown-dragonfly` image.
- Removed CI testing for `i686-apple-darwin`.
## [v0.2.0] - 2020-02-22
- Removed OpenSSL from all images.
- Added support for Podman.
- Bumped all images to at least Ubuntu 16.04.
## [v0.1.16] - 2019-09-17
- Bump OpenSSL version to 1.0.2t.
- Re-enabled `asmjs-unknown-emscripten` target.
- Default to `native` runner instead of `qemu-user` for certain targets.
## [v0.1.15] - 2019-09-04
- Images are now hosted at https://hub.docker.com/r/rustembedded/cross.
- Bump OpenSSL version to 1.0.2p.
- Bump musl version to 1.1.20.
- Bump Ubuntu to 18.04 to all musl targets.
- Bump gcc version to 6.3.0 for all musl targets.
- OpenSSL support for the `arm-unknown-linux-musleabi` target.
- OpenSSL support for the `armv7-unknown-linux-musleabihf` target.
- Build and test support for `aarch64-unknown-linux-musl`, `arm-unknown-linux-musleabihf`,
`armv5te-unknown-linux-musleabi`, `i586-unknown-linux-musl`, `mips-unknown-linux-musl`,
add `mipsel-unknown-linux-musl` targets.
## [v0.1.14] - 2017-11-22
### Added
- Support for the `i586-unknown-linux-gnu` target.
### Changed
- Downgraded the Solaris toolchains from 2.11 to 2.10 to make the binaries produced by Cross more
compatible (this version matches what rust-lang/rust is using).
## [v0.1.13] - 2017-11-08
### Added
- Support for the custom [`deb`] subcommand.
[`deb`]: https://github.com/mmstick/cargo-deb
- Partial `test` / `run` support for android targets. Using the android API via `cross run` / `cross test` is _not_ supported because Cross is using QEMU instead of the official Android emulator.
- Partial support for the `sparcv9-sun-solaris` and `x86_64-sun-solaris` targets. `cross test` and
`cross run` doesn't work for these new targets.
- OpenSSL support for the `i686-unknown-linux-musl` target.
### Changed
- Bump OpenSSL version to 1.0.2m.
## [v0.1.12] - 2017-09-22
### Added
- Support for `cross check`. This subcommand won't use any Docker container.
### Changed
- `binfmt_misc` is not required on the host for toolchain v1.19.0 and newer.
With these toolchains `binfmt_misc` interpreters don't need to be installed
on the host saving a _privileged_ docker run which some systems don't allow.
## [v0.1.11] - 2017-06-10
### Added
- Build and test support for `i686-pc-windows-gnu`, `x86_64-pc-windows-gnu`,
`asmjs-unknown-emscripten` and `wasm-unknown-emscripten`.
- Build support for `aarch64-linux-android`, `arm-linux-androideabi`,
`armv7-linux-androideabi`, `x86_64-linux-android` and `i686-linux-android`
- A `build.env.passthrough` / `build.target.*.passthrough` option to Cross.toml
to support passing environment variables from the host to the Docker image.
### Changed
- Bumped OpenSSL version to 1.0.2k
- Bumped QEMU version to 2.9.0
## [v0.1.10] - 2017-04-02
### Added
- Cross compilation support for `x86_64-pc-windows-gnu`
- Cross compilation support for Android targets
### Changed
- Bumped OpenSSL version to 1.0.2k
## [v0.1.9] - 2017-02-08
### Added
- Support for ARM MUSL targets.
### Changed
- The automatic lockfile update that happens every time `cross` is invoked
should no longer hit the network when there's no git dependency to add/update.
- The QEMU_STRACE variable is passed to the underlying Docker container. Paired
with `cross run`, this lets you get a trace of system call from the execution
of "foreign" (non x86_64) binaries.
## [v0.1.8] - 2017-01-21
### Added
- Support for custom targets. Cross will now also try to use a docker image for
them. As with the built-in targets, one can override the image using
`[target.{}.image]` in Cross.toml.
### Changed
- Moved to a newer Xargo: v0.3.5
## [v0.1.7] - 2017-01-19
### Changed
- Moved to a newer Xargo: v0.3.4
### Fixed
- QEMU interpreters were being register when not required, e.g. for the
`x86_64-unknown-linux-gnu` target.
## [v0.1.6] - 2017-01-14
### Fixed
- Stable releases were picking the wrong image (wrong tag: 0.1.5 instead of
v0.1.5)
## [v0.1.5] - 2017-01-14 [YANKED]
### Added
- `cross run` support for the thumb targets.
- A `build.xargo` / `target.$TARGET.xargo` option to Cross.toml to use Xargo
instead of Cargo.
- A `target.$TARGET.image` option to override the Docker image used for
`$TARGET`.
- A `sparc64-unknown-linux-gnu` environment.
- A `x86_64-unknown-dragonfly` environment.
### Changed
- Building older versions (<0.7.0) of the `openssl` crate is now supported.
- Before Docker is invoked, `cross` will _always_ (re)generate the lockfile to
avoid errors later on due to read/write permissions. This removes the need to
call `cargo generate-lockfile` before `cross` in _all_ cases.
## [v0.1.4] - 2017-01-07
### Added
- Support for the `arm-unknown-linux-gnueabi` target
- `cross build` support for:
- `i686-unknown-freebsd`
- `x86_64-unknown-freebsd`
- `x86_64-unknown-netbsd`
### Changed
- It's no longer necessary to call `cargo generate-lockfile` before using
`cross` as `cross` will now take care of creating a lockfile when necessary.
- The C environments for the `thumb` targets now include newlib (`libc.a`,
`libm.a`, etc.)
### Fixed
- A segfault when `cross` was trying to figure out the name of the user that
called it.
## [v0.1.3] - 2017-01-01
### Changed
- Fix the `i686-unknown-linux-musl` target
## [v0.1.2] - 2016-12-31
### Added
- Support for `i686-unknown-linux-musl`
- Support for `cross build`ing crates for the `thumbv*-none-eabi*` targets.
## [v0.1.1] - 2016-12-28
### Added
- Support for `x86_64-unknown-linux-musl`
- Print shell commands when the verbose flag is used.
- Support crossing from x86_64 osx to i686 osx
## v0.1.0 - 2016-12-26
- Initial release. Supports 12 targets.
<!-- prettier-ignore-start -->
<!-- next-url -->
[Unreleased]: https://github.com/cross-rs/cross/compare/v0.2.2...HEAD
[v0.2.2]: https://github.com/cross-rs/cross/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/cross-rs/cross/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/cross-rs/cross/compare/v0.1.16...v0.2.0
[v0.1.16]: https://github.com/cross-rs/cross/compare/v0.1.15...v0.1.16
[v0.1.15]: https://github.com/cross-rs/cross/compare/v0.1.14...v0.1.15
[v0.1.14]: https://github.com/cross-rs/cross/compare/v0.1.13...v0.1.14
[v0.1.13]: https://github.com/cross-rs/cross/compare/v0.1.12...v0.1.13
[v0.1.12]: https://github.com/cross-rs/cross/compare/v0.1.11...v0.1.12
[v0.1.11]: https://github.com/cross-rs/cross/compare/v0.1.10...v0.1.11
[v0.1.10]: https://github.com/cross-rs/cross/compare/v0.1.9...v0.1.10
[v0.1.9]: https://github.com/cross-rs/cross/compare/v0.1.8...v0.1.9
[v0.1.8]: https://github.com/cross-rs/cross/compare/v0.1.7...v0.1.8
[v0.1.7]: https://github.com/cross-rs/cross/compare/v0.1.6...v0.1.7
[v0.1.6]: https://github.com/cross-rs/cross/compare/v0.1.5...v0.1.6
[v0.1.5]: https://github.com/cross-rs/cross/compare/v0.1.4...v0.1.5
[v0.1.4]: https://github.com/cross-rs/cross/compare/v0.1.3...v0.1.4
[v0.1.3]: https://github.com/cross-rs/cross/compare/v0.1.2...v0.1.3
[v0.1.2]: https://github.com/cross-rs/cross/compare/v0.1.1...v0.1.2
[v0.1.1]: https://github.com/cross-rs/cross/compare/v0.1.0...v0.1.1
<!-- prettier-ignore-end -->
================================================
FILE: .changes/template/issue440.json
================================================
{
"description": "no associated PR.",
"issues": [440],
"type": "fixed"
}
================================================
FILE: .editorconfig
================================================
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{rs,py,sh,md,toml,yml,js}]
charset = utf-8
[*.{rs,py,sh,yml,js}]
trim_trailing_whitespace = true
[*.{rs,py,sh}]
indent_style = space
indent_size = 4
[*.yml]
indent_style = space
indent_size = 2
[Dockerfile.*]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
================================================
FILE: .gitattributes
================================================
* text=auto
Dockerfile.* linguist-language=Dockerfile eol=lf
================================================
FILE: .github/CODEOWNERS
================================================
* @cross-rs/maintainers
================================================
FILE: .github/ISSUE_TEMPLATE/a_blank_issue.md
================================================
---
name: Blank Issue
about: Create a blank issue.
---
================================================
FILE: .github/ISSUE_TEMPLATE/b_issue_report.yml
================================================
name: Issue report
description: Report something that is broken, missing or wrong.
body:
- type: checkboxes
id: acknowledgments
attributes:
label: Checklist
options:
- label: I've looked through the [issues and pull requests](https://github.com/cross-rs/cross/issues?q=) for similar reports
required: true
- type: textarea
id: description
validations:
required: true
attributes:
label: Describe your issue
description: |
Write a description of your issue. Include error messages if there are any.
placeholder: |
Examples:
- cross no longer compiles my project after upgrade.
- I have trouble doing X.
- Feature X has stopped working for me.
- type: dropdown
id: target
attributes:
label: What target(s) are you cross-compiling for?
description: You may select more than one or none if this is not applicable (N/A).
multiple: true
options:
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- aarch64-unknown-freebsd
- arm-linux-androideabi
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- arm-unknown-linux-musleabi
- arm-unknown-linux-musleabihf
- armv5te-unknown-linux-gnueabi
- armv5te-unknown-linux-musleabi
- armv7-linux-androideabi
- armv7-unknown-linux-gnueabihf
- armv7-unknown-linux-musleabihf
- asmjs-unknown-emscripten
- i586-unknown-linux-gnu
- i586-unknown-linux-musl
- i686-linux-android
- i686-pc-windows-gnu
- i686-unknown-freebsd
- i686-unknown-linux-gnu
- i686-unknown-linux-musl
- loongarch64-unknown-linux-gnu
- loongarch64-unknown-linux-musl
- mips64el-unknown-linux-gnuabi64
- mips64el-unknown-linux-muslabi64
- mips64-unknown-linux-gnuabi64
- mips64-unknown-linux-muslabi64
- mipsel-unknown-linux-gnu
- mipsel-unknown-linux-musl
- mips-unknown-linux-gnu
- mips-unknown-linux-musl
- powerpc64le-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- riscv64gc-unknown-linux-musl
- s390x-unknown-linux-gnu
- sparc64-unknown-linux-gnu
- sparcv9-sun-solaris
- thumbv6m-none-eabi
- thumbv7em-none-eabi
- thumbv7em-none-eabihf
- thumbv7m-none-eabi
- wasm32-unknown-emscripten
- x86_64-linux-android
- x86_64-pc-windows-gnu
- x86_64-pc-solaris
- x86_64-unknown-freebsd
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-unknown-netbsd
- other (specify in description)
- type: checkboxes
id: host-system
attributes:
label: Which operating system is the host (e.g computer cross is on) running?
description: You may select more than one or none if N/A.
options:
- label: macOS
- label: Windows
- label: Linux / BSD
- label: other OS (specify in description)
- type: checkboxes
id: host-arch
attributes:
label: What architecture is the host?
description: You may select more than one or none if N/A.
options:
- label: x86_64 / AMD64
- label: arm32
- label: arm64 (including Mac M1)
- type: checkboxes
id: container-engine
attributes:
label: What container engine is cross using?
description: You may select more than one or none if N/A.
options:
- label: docker
- label: podman
- label: other container engine (specify in description)
- type: input
id: cross-version
validations:
required: true
attributes:
label: cross version
description: The version of cross given with `cross -V` or `cross --version`
placeholder: cross 0.4.2 (c8df353 2025-01-01)
- type: textarea
id: mcve
attributes:
label: Example
description: Please provide a short, complete example of the issue if possible.
placeholder: |
```sh
git clone https://github.com/ghost/my_mcve
cross build --target x86_65-unknown-linux-gnu
```
Gives the error message `could not discover target specification`
- type: textarea
id: additional
attributes:
label: Additional information / notes
description: Provide any information you think is relevant to the issue
placeholder: It builds on `asmjs-unknown-emscripten`
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
- name: Question?
url: https://matrix.to/#/#cross-rs:matrix.org
about: Reach out to us on our Matrix room if you want!
- name: Question!
url: https://github.com/cross-rs/cross/discussions/categories/q-a
about: Or try the Q&A discussions
- name: FAQ
url: https://github.com/cross-rs/cross/wiki/FAQ
about: Frequently Asked Questions are compiled here.
================================================
FILE: .github/ISSUE_TEMPLATE/z_feature_request.yml
================================================
name: Feature Request
description: Leave a feature request if you have a suggestion to improve cross and/or the rust ecosystem
labels: ["feature-request"]
body:
- type: checkboxes
id: acknowledgments
attributes:
label: Checklist
options:
- label: I've looked through the [issues and pull requests](https://github.com/cross-rs/cross/issues?q=) for similar request
required: true
- label: This feature could be solved with a [custom image](https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#custom-images) (optional)
- type: textarea
id: description
validations:
required: true
attributes:
label: Describe your request
description: |
Write a description of what your feature would do.
If you have an idea how to solve this, feel free to leave a comment on the feature request after creating it.
If you have tried solved this but couldn't, explain what you tried and how or why it didn't work. We want to help!
placeholder: |
Examples:
- cross should be able to do X.
- Add more emojis to the error printing.
- Implement support for cargo feature X.
- type: textarea
id: motivation
validations:
required: false
attributes:
label: Describe why this would be a good inclusion for `cross`
description: |
Why should this be added?
================================================
FILE: .github/actions/cargo-install-upload-artifacts/action.yml
================================================
name: Upload cargo install artifacts
description: Upload `cargo install` artifacts
inputs:
target:
description: 'Target'
required: true
runs:
using: composite
steps:
- name: Setup
id: metadata
run: |
metadata="$(cargo metadata --format-version 1 --no-deps)"
package_name="cross"
echo "package-name=${package_name}" >> $GITHUB_OUTPUT
out_dir="$(mktemp -d)"
artifacts_dir="$(mktemp -d)"
if which cygpath; then
out_dir="$(cygpath -w "${out_dir}")"
artifacts_dir="$(cygpath -w "${artifacts_dir}")"
fi
echo "out-dir=${out_dir}" >> $GITHUB_OUTPUT
echo "artifacts-dir=${artifacts_dir}" >> $GITHUB_OUTPUT
shell: bash
- run: rm -rf .git
shell: bash
- name: Build with all features
run:
cargo install
--locked
--path .
--target ${{ inputs.target }}
--all-features
--root ${{ steps.metadata.outputs.out-dir }}
--bins
shell: ${{ contains(runner.os, 'windows') && 'pwsh' || 'bash' }}
env:
RUSTFLAGS: "" # Make sure to unset RUSTFLAGS
- name: Archive artifacts
id: archive
run: |
set -x
if which cygpath; then
out_dir="$(cygpath -u "${out_dir}")"
artifacts_dir="$(cygpath -u "${artifacts_dir}")"
fi
artifact_name="${package_name}-${target}"
artifact_path="${artifacts_dir}/${artifact_name}.tar.gz"
pushd "${out_dir}/bin"
tar -cvzf "${artifact_path}" *
popd
tar -tf "${artifact_path}"
ls -al "${artifact_path}"
if which cygpath; then
artifact_path="$(cygpath -w "${artifact_path}")"
fi
echo "name=${artifact_name}" >> $GITHUB_OUTPUT
echo "path=${artifact_path}" >> $GITHUB_OUTPUT
env:
package_name: ${{ steps.metadata.outputs.package-name }}
out_dir: ${{ steps.metadata.outputs.out-dir }}
artifacts_dir: ${{ steps.metadata.outputs.artifacts-dir }}
target: ${{ inputs.target }}
shell: bash
- name: Upload artifacts
if: ${{ steps.archive.outputs.path }}
uses: actions/upload-artifact@v4
with:
name: ${{ steps.archive.outputs.name }}
path: ${{ steps.archive.outputs.path }}
if-no-files-found: error
================================================
FILE: .github/actions/cargo-llvm-cov/action.yml
================================================
name: llvm coverage
description: Sets up everything that is needed for coverage. Makes artifacts available for processing later, prefixed with _coverage-
inputs:
name:
description: 'the name of the artifact'
required: true
outputs:
artifact-name:
description: 'the name of the artifact'
value: ${{ steps.cov.outputs.artifact-name }}
runs:
using: composite
steps:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov@0.5.3
- run: rustup component add llvm-tools-preview
shell: bash
- name: LLVM instrument coverage
id: cov
uses: ./.github/actions/post
if: always()
with:
main: |
pwd=$(pwd)
if which cygpath; then
pwd="$(cygpath -w "$(pwd)")"
fi
echo RUSTFLAGS=" -C instrument-coverage --remap-path-prefix ${pwd}=" >> $GITHUB_ENV
echo LLVM_PROFILE_FILE="${pwd}/target/cross-%m.profraw" >> $GITHUB_ENV
echo CARGO_INCREMENTAL="0" >> $GITHUB_ENV
echo RUST_TEST_THREADS="1" >> $GITHUB_ENV
echo "artifact-name=_coverage-${name}" >> $GITHUB_OUTPUT
post: |
# XXX(emilgardis): Upload early?
pwd=$(pwd)
if which cygpath; then
pwd="$(cygpath -w "$(pwd)")"
fi
export LLVM_PROFILE_FILE="${pwd}/target/cross-%m.profraw"
export CARGO_LLVM_COV_TARGET_DIR="${pwd}/target"
mkdir coverage
echo $(ls target)
cargo llvm-cov report --remap-path-prefix --lcov --output-path "coverage/lcov.${name}.info" -vv || ( echo "::error title=Coverage merge failed::" && exit 0 )
rm target/*.profraw
npm install @actions/artifact
npm install glob
cat <<-EOT | node - || ( echo "::error title=Coverage upload failed::" && exit 0 )
(async function main() {
var artifact = require('@actions/artifact');
var glob = require('glob')
const artifactClient = artifact.create();
const artifactName = '_coverage-' + process.env.name;
const files = glob.sync("coverage/*");
if (!files.length) {
process.exit(0);
}
console.log("${files}")
const options = { retentionDays: 2 };
const upload = await artifactClient.uploadArtifact(artifactName, files, "coverage", options);
})()
EOT
env:
name: ${{ inputs.name }}
================================================
FILE: .github/actions/cargo-publish/action.yml
================================================
name: Publish crate
description: Publish crate on crates.io and create release on github
inputs:
cargo-registry-token:
description: 'API token for crates.io'
required: true
github-token:
description: 'Github API token'
required: true
runs:
using: composite
steps:
- name: Read changelog
id: changelog-reader
uses: mindsers/changelog-reader-action@v2
with:
# validation_depth: 10
version: ${{ (github.ref_type == 'tag' && !contains(github.ref_name, '-') && github.ref_name) || 'Unreleased' }}
path: ./CHANGELOG.md
- name: Download artifacts
id: download-artifacts
uses: actions/download-artifact@v4
with:
path:
${{ runner.temp }}/artifacts
- name: Log into crates.io
if: >
github.event_name == 'push' && (
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
startsWith(github.ref, 'refs/tags/v')
)
run: cargo login ${{ inputs.cargo-registry-token }}
shell: bash
- run: gh release delete --yes Unreleased || exit 0
if: >
github.event_name == 'push' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
- name: Create GitHub release
if: >
github.event_name == 'push' && (
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
startsWith(github.ref, 'refs/tags/v')
)
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ (github.ref_type == 'tag' && github.ref_name) || 'Unreleased' }}
body: ${{ steps.changelog-reader.outputs.changes }}
prerelease: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref_name, '-') }}
draft: ${{ !startsWith(github.ref, 'refs/tags/v') && steps.changelog-reader.outputs.status == 'unreleased' }}
files: |
${{ steps.download-artifacts.outputs.download-path }}/cross-*/*
- name: Publish crate
run: cargo publish ${{ !startsWith(github.ref, 'refs/tags/v') && '--dry-run' || '' }}
shell: bash
================================================
FILE: .github/actions/post/action.yml
================================================
# adapted from https://github.com/actions/runner/issues/1478
name: With post step
description: 'Generic JS Action to execute a main command and set a command in a post step.'
inputs:
main:
description: 'Main command/script.'
required: true
post:
description: 'Post command/script.'
required: true
runs:
using: 'node20'
main: 'main.js'
post: 'main.js'
================================================
FILE: .github/actions/post/main.js
================================================
// adapted from https://github.com/actions/runner/issues/1478
const { exec } = require("child_process");
function run(cmd) {
exec(cmd, { shell: "bash" }, (error, stdout, stderr) => {
if (stdout.length != 0) {
console.log(`${stdout}`);
}
if (stderr.length != 0) {
console.error(`${stderr}`);
}
if (error) {
process.exitCode = error.code;
console.error(`${error}`);
}
});
}
if (process.env[`STATE_POST`] != undefined) {
// Are we in the 'post' step?
run(process.env.INPUT_POST);
} else {
// Otherwise, this is the main step
console.log(`POST=true >> $GITHUB_STATE`);
run(process.env.INPUT_MAIN);
}
================================================
FILE: .github/actions/setup-rust/action.yml
================================================
name: Setup Rust
description: Setup Rust with specified toolchain, target and components.
inputs:
toolchain:
description: 'Toolchain'
default: stable
required: true
target:
description: 'Target'
required: false
components:
description: 'Components'
required: false
runs:
using: composite
steps:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ inputs.toolchain }}
target: ${{ inputs.target }}
components: ${{ inputs.components }}
- name: Install rust matcher
run: echo "::add-matcher::.github/actions/setup-rust/rust.json"
shell: bash
- uses: Swatinem/rust-cache@v2.2.0
================================================
FILE: .github/actions/setup-rust/rust.json
================================================
{
"problemMatcher": [
{
"owner": "rust",
"pattern": [
{
"regexp": "^(warning|warn|error)(\\[(.*)\\])?: (.*)$",
"severity": 1,
"message": 4,
"code": 3
},
{
"regexp": "^([\\s->=]*(.*):(\\d*):(\\d*)|.*)$",
"file": 2,
"line": 3,
"column": 4
}
]
},
{
"owner": "cross-rs",
"pattern": [
{
"regexp": "^\\[cross\\] (warning|error): (.*)$",
"severity": 1,
"message": 2
}
]
}
]
}
================================================
FILE: .github/bors.toml
================================================
block_labels = ["needs-decision"]
delete_merged_branches = true
required_approvals = 0
use_codeowners = false
status = ["conclusion"]
timeout_sec = 21600
================================================
FILE: .github/codecov.yml
================================================
comment: false
codecov:
branch: main
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
flag_management:
default_rules: # the rules that will be followed for any flag added, generally.
carryforward: true
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github_actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/actions/cargo-install-upload-artifacts"
schedule:
interval: "weekly"
groups:
github_actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/actions/cargo-llvm-cov"
schedule:
interval: "weekly"
groups:
github_actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/actions/cargo-publish"
schedule:
interval: "weekly"
groups:
github_actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/actions/post"
schedule:
interval: "weekly"
groups:
github_actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/actions/setup-rust"
schedule:
interval: "weekly"
groups:
github_actions:
patterns:
- "*"
================================================
FILE: .github/workflows/changelog.yml.x
================================================
on:
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]
name: Changelog check
jobs:
changelog:
name: Changelog check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
- name: Get Changed Files
id: files
uses: tj-actions/changed-files@v41
with:
separator: ';'
files: |
.changes/*.json
- name: Validate Changelog
id: changelog
run: |
set -x
set -e
IFS=';' read -a added_modified <<< '${{ steps.files.outputs.all_changed_files }}'
IFS=';' read -a removed <<< '${{ steps.files.outputs.deleted_files }}'
added_count=${#added_modified[@]}
removed_count=${#removed[@]}
if ${{ !contains(github.event.pull_request.labels.*.name, 'no changelog' ) }}; then
if [[ "$added_count" -eq "0" ]] && [[ "$removed_count" -eq "0" ]]; then
echo "Must add or remove changes or add the 'no changelog' label"
exit 1
else
cargo xtask changelog validate
fi
fi
================================================
FILE: .github/workflows/ci.yml
================================================
on:
workflow_call:
inputs:
matrix-args:
required: false
type: string
description: Arguments to pass to `cargo xtask ci-job target-matrix`
checkout-ref:
required: false
type: string
description: Used to checkout a specific ref, instead of the default ref with `actions/checkout` action
pull_request:
merge_group:
push:
branches: [main, staging, trying]
tags:
- "v*.*.*"
name: CI
env:
CARGO_NET_RETRY: 3
CARGO_HTTP_CHECK_REVOKE: false
CROSS_IMAGE: ghcr.io/${{ github.repository_owner }}
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- name: Run ShellCheck
uses: Azbagheri/shell-linter@latest
with:
exclude-paths: ".github/CODEOWNERS,LICENSE-APACHE,LICENSE-MIT"
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: EmbarkStudios/cargo-deny-action@v2
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
with:
components: rustfmt
- name: Run rustfmt
run: cargo fmt -- --check
clippy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
with:
components: clippy
toolchain: 1.92.0 # MSRV, Minimally Supported Rust Version. Make sure to update README.md and clippy.toml
- name: Run clippy
run: cargo clippy --locked --all-targets --all-features --workspace -- -D warnings
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/cargo-llvm-cov
with:
name: test-${{matrix.os}}
- name: Run unit tests
run: cargo test --locked --all-targets --workspace --all-features
timeout-minutes: 10
check:
runs-on: ubuntu-latest
outputs:
is-latest: ${{ steps.check.outputs.is-latest }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- run: cargo xtask ci-job check
id: check
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
tests: ${{ steps.generate-matrix.outputs.tests }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: Generate matrix
id: generate-matrix
run: cargo xtask ci-job target-matrix ${{ github.event_name == 'merge_group' && format('--merge-group {0}', github.ref) || '' }} ${{ inputs.matrix-args || '' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
name: target (${{ matrix.pretty }},${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: [shellcheck, test, generate-matrix, check]
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' || github.event_name == 'issue_comment' || github.event_name == 'schedule') && needs.generate-matrix.outputs.matrix != '{}' && needs.generate-matrix.outputs.matrix != '[]' && needs.generate-matrix.outputs.matrix != ''
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.pretty }}
cancel-in-progress: false
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
outputs:
has-image: ${{ steps.prepare-meta.outputs.has-image }}
images: ${{ steps.build-docker-image.outputs.images && fromJSON(steps.build-docker-image.outputs.images) }}
coverage-artifact: ${{ steps.cov.outputs.artifact-name }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: Set up Docker Buildx
if: runner.os == 'Linux'
uses: docker/setup-buildx-action@v2
- name: Build xtask
run: cargo build -p xtask
- name: Prepare Meta
id: prepare-meta
timeout-minutes: 60
run: cargo xtask ci-job prepare-meta "${TARGET}${SUB:+.$SUB}"
env:
TARGET: ${{ matrix.target }}
SUB: ${{ matrix.sub }}
shell: bash
- name: LLVM instrument coverage
id: cov
uses: ./.github/actions/cargo-llvm-cov
if: steps.prepare-meta.outputs.has-image && steps.prepare-meta.outputs.test-variant != 'zig'
with:
name: cross-${{matrix.pretty}}
- name: Install cross
if: matrix.deploy
run: cargo install --path . --force --debug
- name: Docker Meta
if: steps.prepare-meta.outputs.has-image
id: docker-meta
uses: docker/metadata-action@v4
with:
images: |
name=${{ steps.prepare-meta.outputs.image }}
labels: |
${{ fromJSON(steps.prepare-meta.outputs.labels) }}
- name: Build Docker image
id: build-docker-image
if: steps.prepare-meta.outputs.has-image
timeout-minutes: 120
run: cargo xtask build-docker-image -v "${TARGET}${SUB:+.$SUB}" ${{ matrix.verbose && '-v' || '' }}
env:
TARGET: ${{ matrix.target }}
SUB: ${{ matrix.sub }}
LABELS: ${{ steps.docker-meta.outputs.labels }}
LATEST: ${{ needs.check.outputs.is-latest || 'false' }}
CROSS_DEBUG: ${{ matrix.cross-debug }}
shell: bash
- name: Set Docker image for test
if: steps.prepare-meta.outputs.has-image
run: |
TARGET_VAR="cross_target_${TARGET//-/_}_image"
echo "${TARGET_VAR^^}=${IMAGE}" | tee -a "${GITHUB_ENV}"
env:
TARGET: ${{ matrix.target }}
IMAGE: ${{ steps.build-docker-image.outputs.image }}
shell: bash
- name: Test Image
if: steps.prepare-meta.outputs.has-image && steps.prepare-meta.outputs.test-variant == 'default'
run: ./ci/test.sh
env:
TARGET: ${{ matrix.target }}
CPP: ${{ matrix.cpp }}
DYLIB: ${{ matrix.dylib }}
STD: ${{ matrix.std }}
BUILD_STD: ${{ matrix.build-std }}
RUN: ${{ matrix.run }}
RUNNERS: ${{ matrix.runners }}
CROSS_DEBUG: ${{ matrix.cross-debug }}
shell: bash
- uses: ./.github/actions/cargo-install-upload-artifacts
if: matrix.deploy
with:
target: ${{ matrix.target }}
- name: Test Zig Image
if: steps.prepare-meta.outputs.has-image && steps.prepare-meta.outputs.test-variant == 'zig'
run: ./ci/test-zig-image.sh
shell: bash
- name: Test Cross Image
if: steps.prepare-meta.outputs.has-image && steps.prepare-meta.outputs.test-variant == 'cross'
run: ./ci/test-cross-image.sh
env:
TARGET: 'aarch64-unknown-linux-gnu'
IMAGE: 'ghcr.io/${{ github.repository_owner }}/aarch64-unknown-linux-gnu:main'
shell: bash
- name: Login to GitHub Container Registry
if: steps.prepare-meta.outputs.has-image
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image to GitHub Container Registry
if: >
(github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') &&
steps.prepare-meta.outputs.has-image && (
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
startsWith(github.ref, 'refs/tags/v')
)
run: cargo xtask build-docker-image -v --push "${TARGET}${SUB:+.$SUB}"
env:
TARGET: ${{ matrix.target }}
SUB: ${{ matrix.sub }}
LABELS: ${{ steps.docker-meta.outputs.labels }}
LATEST: ${{ needs.check.outputs.is-latest || 'false' }}
shell: bash
# we should always have an artifact from a previous build.
remote:
needs: [test, check, generate-matrix]
if: fromJson(needs.generate-matrix.outputs.tests).remote
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: LLVM instrument coverage
uses: ./.github/actions/cargo-llvm-cov
with:
name: integration-remote
- name: Run Remote Test
env:
TARGET: aarch64-unknown-linux-gnu
run: ./ci/test-remote.sh
shell: bash
bisect:
needs: [test, check, generate-matrix]
if: fromJson(needs.generate-matrix.outputs.tests).bisect
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: LLVM instrument coverage
uses: ./.github/actions/cargo-llvm-cov
with:
name: integration-bisect
- name: Run Bisect Test
env:
TARGET: aarch64-unknown-linux-gnu
run: ./ci/test-bisect.sh
shell: bash
foreign:
needs: [test, check, generate-matrix]
if: fromJson(needs.generate-matrix.outputs.tests).foreign
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: LLVM instrument coverage
uses: ./.github/actions/cargo-llvm-cov
with:
name: integration-bisect
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Set up docker buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
- name: Run Foreign toolchain test
run: ./ci/test-foreign-toolchain.sh
shell: bash
docker-in-docker:
needs: [test, check, generate-matrix]
if: fromJson(needs.generate-matrix.outputs.tests).docker-in-docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: LLVM instrument coverage
uses: ./.github/actions/cargo-llvm-cov
with:
name: integration-docker-in-docker
- name: Run Docker-in-Docker Test
env:
TARGET: aarch64-unknown-linux-gnu
IMAGE: 'ghcr.io/${{ github.repository_owner }}/aarch64-unknown-linux-gnu:main'
run: ./ci/test-docker-in-docker.sh
shell: bash
podman:
name: podman
runs-on: ubuntu-latest
needs: [shellcheck, test, check, generate-matrix]
if: fromJson(needs.generate-matrix.outputs.tests).podman
strategy:
fail-fast: false
outputs:
coverage-artifact: ${{ steps.cov.outputs.artifact-name }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- name: Install Podman
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install podman --no-install-recommends --assume-yes
- name: LLVM instrument coverage
id: cov
uses: ./.github/actions/cargo-llvm-cov
with:
name: cross-podman-aarch64-unknown-linux-gnu
- name: Install cross
run: cargo install --path . --force --debug
- name: Run Podman Test
run: ./ci/test-podman.sh
env:
CROSS_CONTAINER_ENGINE: podman
TARGET: aarch64-unknown-linux-gnu
shell: bash
publish:
needs: [build, check, fmt, clippy, cargo-deny]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- uses: ./.github/actions/cargo-publish
with:
cargo-registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
conclusion:
needs: [shellcheck, fmt, clippy, test, generate-matrix, build, publish, check, remote, bisect, docker-in-docker, foreign, podman]
if: always()
runs-on: ubuntu-latest
steps:
- name: Result
run: |
jq -C <<< "${needs}"
# Check if all needs were successful or skipped.
"$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
env:
needs: ${{ toJson(needs) }}
code-cov:
name: Coverage
needs: [test, build, conclusion, generate-matrix]
# should check that there are any artifacts, if not skip
if: always() && (needs.build.result == 'success' || needs.build.result == 'skipped') && needs.test.result == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.checkout-ref }}
- uses: ./.github/actions/setup-rust
- uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/artifacts
- name: Grab PR number
run: echo "pr=$(echo ${commit_message} | sed -ne 's/.*#\(.*\):/\1/p')" >> $GITHUB_OUTPUT
id: pr-number
if: ${{ !github.event.pull_request.number }}
env:
commit_message: >
${{
((
startsWith(github.event.head_commit.message, 'Try #') &&
github.event.head_commit.author.username == 'bors[bot]'
) && github.event.head_commit.message) || ''
}}
- name: Upload to codecov.io
run: |
set -x
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
sha_rev=$(git rev-parse HEAD)
for file in $(find ${artifacts} -name "lcov.*.info" -exec ls {} +); do
name=$(echo $file | awk -F'.' '{print $2}');
./codecov -F $name ${pr:+-P ${pr}} -f $file --sha ${sha_rev} -n $name;
done
env:
pr: ${{ steps.pr-number.outputs.pr }}
artifacts: ${{ runner.temp }}/artifacts
================================================
FILE: .github/workflows/try.yml
================================================
name: Try
on:
issue_comment:
types: [created]
jobs:
acknowledge:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && (contains(toJson(github.event.comment.body), '\n/ci try') || startsWith(github.event.comment.body, '/ci try'))
steps:
- uses: actions/checkout@v3
- name: Acknowledge command
id: acknowledge
run: |
gh pr comment ${{ github.event.issue.number }} --body "<!--try-ack-comment-->
Starting try run. [Link to action](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?pr=${{ github.event.issue.number }})"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
try:
if: github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && (contains(toJson(github.event.comment.body), '\n/ci try') || startsWith(github.event.comment.body, '/ci try'))
uses: ./.github/workflows/ci.yml
with:
matrix-args: try --comment "${{ github.event.comment.body }}" --pr ${{ github.event.issue.number }}
checkout-ref: refs/pull/${{ github.event.issue.number }}/head
comment:
needs: [try, acknowledge]
if: always() && needs.try.result != 'skipped'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Minimize existing comments
run: |
COMMENTS=$(gh pr view ${{ github.event.issue.number }} --json comments --jq '.comments[] | select((.body | contains("<!--try-conclusion-comment-->") or contains("<!--try-ack-comment-->")) and (.author.login == "github-actions") and (.isMinimized | not)) | .id')
while read -r comment_id; do
gh api graphql -f query='mutation { minimizeComment(input: { classifier: OUTDATED, subjectId: "'"$comment_id"'" }) { minimizedComment { isMinimized } } }'
done <<< "$COMMENTS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
# comment on the PR with the result and links to the logs using gh cli
# Something like `### Try build: [{result}]({link_to_logs})`
# the url to the logs are on jobs[name="try"].url gathered with `gh run view ${{ github.run_id }} --json jobs`
- name: Comment on PR
run: |
PR_ID=${{ github.event.issue.number }}
gh run view ${{ github.run_id }} --json jobs |\
jq -r --arg pr_id "$PR_ID" --arg comment "${{ github.event.comment.html_url }}" '
def box: .conclusion | if . == "success" then "✔️ " elif . == "skipped" then "🛇 " else "❌ " end;
def reason: if .conclusion == "failure" and (.steps | length > 0) then .steps[] | select(.conclusion == "failure") | .name else "" end;
def job_to_md: . | "- [\(.name)](\(.url)?pr=\($pr_id)\(.conclusion | if . == "success" then "#step:10:1)" else "#)" end) - \(box) \(reason)";
def wrap_if_needed:
(.[0].conclusion | if . == "success" then "#### Successful Jobs\n\n" else "#### Failed Jobs\n\n" end) +
if length > 10 then
"<details>\n<summary>List</summary>\n\n\(map(job_to_md) | join("\n"))\n\n</details>\n"
else
map(job_to_md) | join("\n") + "\n"
end;
"<!--try-conclusion-comment-->\n## [Try](\(.jobs[] | select(.name == "try / generate-matrix") | .url + "#step:4:18")) run for [comment](\($comment))\n\n" +
"\(.jobs[] | select(.name == "try / conclusion") | job_to_md)\n\n" +
([.jobs[] | select(.name | startswith("try / target")) | select(.name | contains("matrix.pretty") | not ) | . as $job |
{conclusion: $job.conclusion, name: ($job.name | capture("\\((?<name>[^,]+),.*") | .name), url: $job.url, steps: $job.steps } ] |
group_by(if .conclusion == "success" then "success" else "failure" end) |
map(wrap_if_needed) |
join("\n"))' |\
gh pr comment "$PR_ID" --body "$(< /dev/stdin)"
env:
GH_TOKEN: ${{ github.token }}
================================================
FILE: .github/workflows/weekly.yml
================================================
on:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:
inputs:
targets:
required: false
description: 'check these space or comma separated targets, supports wildcard *'
name: Check
env:
CARGO_NET_RETRY: 3
CARGO_HTTP_CHECK_REVOKE: false
jobs:
weekly:
uses: ./.github/workflows/ci.yml
with:
matrix-args: --weekly
checkout-ref: ${{ github.ref }}
wiki:
name: Ensure wiki is valid
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
- run: git clone ${wikirepo}
shell: bash
env:
wikirepo: https://github.com/${{ github.repository }}.wiki.git
- run: cargo test toml_check -- --nocapture
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
================================================
FILE: .gitignore
================================================
**/target/
**/.idea/
**/.vscode/*.*
**/*.log
/cargo-timing*.html
CHANGELOG.md.draft
# python stuff
__pycache__/
.pytest_cache/
*.py[cod]
*$py.class
*.egg-info/
*.egg
.tox
#--------------------------------------------------#
# The following was generated with gitignore.nvim: #
#--------------------------------------------------#
# Gitignore for the following technologies: Vim
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
================================================
FILE: .gitmodules
================================================
[submodule "docker/cross-toolchains"]
path = docker/cross-toolchains
url = https://github.com/cross-rs/cross-toolchains.git
================================================
FILE: CHANGELOG.md
================================================
# Change Log
All notable changes to this project will be documented in this file. This is an automatically-generated document: entries are added via changesets present in the `.changes` directory.
This project adheres to [Semantic Versioning](http://semver.org/).
<!-- next-header -->
## [Unreleased] - ReleaseDate
## [v0.2.5] - 2023-02-04
## Fixed
- #962 - fix SELinux labels to allow use in multiple containers and/or the host filesystem.
- #1166 - freebsd: include memstat in build image to fix build with libc 0.2.138 and up.
- #1183 - resolve issue when using `pre-build` in `Cargo.toml`
## [v0.2.4] - 2022-07-10
### Fixed
- #930 - fix any parsing of 1-character subcommands
- #929 - Fixed issue where `--verbose` would not output data when it should
## [v0.2.3] - 2022-07-09
### Added
- #921 - use `CARGO_TERM_VERBOSE`, `CARGO_TERM_QUIET`, and `CARGO_TERM_COLOR` environment variables for cross terminal output.
- #913 - added the `x86_64-unknown-illumos` target.
- #910 - `pre-build` can now take a string pointing to a script file to run.
- #905 - added `qemu-runner` for musl images, allowing use of native or emulated runners.
- #905 - added qemu emulation to `i586-unknown-linux-gnu`, `i686-unknown-linux-musl`, and `i586-unknown-linux-gnu`, so they can run on an `x86` CPU, rather than an `x86_64` CPU.
- #900 - add the option to skip copying build artifacts back to host when using remote cross via `CROSS_REMOTE_SKIP_BUILD_ARTIFACTS`.
- #891 - support custom user namespace overrides by setting the `CROSS_CONTAINER_USER_NAMESPACE` environment variable.
- #890 - support rootless docker via the `CROSS_ROOTLESS_CONTAINER_ENGINE` environment variable.
- #878 - added an image `ghcr.io/cross-rs/cross` containing cross.
### Changed
- #869 - ensure cargo configuration environment variable flags are passed to the docker container.
- #859 - added color diagnostic output and error messages.
### Fixed
- #905 - fixed running dynamically-linked libraries for all musl targets except `x86_64-unknown-linux-musl`.
- #904 - ensure `cargo metadata` works by using the same channel.
- #904 - fixed the path for workspace volumes and passthrough volumes with docker-in-docker.
- #898 - fix the path to the mount root with docker-in-docker if mounting volumes.
- #897 - ensure `target.$(...)` config options override `build` ones when parsing strings and vecs.
- #895 - convert filenames in docker tags to ASCII lowercase and ignore invalid characters
- #885 - handle symlinks when using remote docker.
- #868 - ignore the `CARGO` environment variable.
- #867 - fixed parsing of `build.env.passthrough` config values.
## [v0.2.2] - 2022-06-24
### Added
- #803 - added `CROSS_CUSTOM_TOOLCHAIN` to disable automatic installation of components for use with tools like `cargo-bisect-rustc`
- #795 - added images for additional toolchains maintained by cross-rs.
- #792 - added `CROSS_CONTAINER_IN_CONTAINER` environment variable to replace `CROSS_DOCKER_IN_DOCKER`.
- #785 - added support for remote container engines through data volumes through setting the `CROSS_REMOTE` environment variable. also adds in utility commands to create and remove persistent data volumes.
- #782 - added `build-std` config option, which builds the rust standard library from source if enabled.
- #678 - Add optional `target.{target}.dockerfile[.file]`, `target.{target}.dockerfile.context` and `target.{target}.dockerfile.build-args` to invoke docker/podman build before using an image.
- #678 - Add `target.{target}.pre-build` config for running commands before building the image.
- #772 - added `CROSS_CONTAINER_OPTS` environment variable to replace `DOCKER_OPTS`.
- #767, #788 - added the `cross-util` and `xtask` commands.
- #842 - Add `Cargo.toml` as configuration source
- #745 - added `thumbv7neon-*` targets.
- #741 - added `armv7-unknown-linux-gnueabi` and `armv7-unknown-linux-musleabi` targets.
- #721 - add support for running doctests on nightly if `CROSS_UNSTABLE_ENABLE_DOCTESTS=true`.
- #719 - add `--list` to known subcommands.
- #681 - Warn on unknown fields and confusable targets
- #624 - Add `build.default-target`
- #647 - Add `mips64-unknown-linux-muslabi64` and `mips64el-unknown-linux-muslabi64` support
- #543 - Added environment variables to control the UID and GID in the container
- #524 - docker: Add Nix Store volume support
- Added support for mounting volumes.
- #684 - Enable cargo workspaces to work from any path in the workspace, and make path dependencies mount seamlessly. Also added support for private SSH dependencies.
### Changed
- #838 - re-enabled the solaris targets.
- #807 - update Qemu to 6.1.0 on images using Ubuntu 18.04+ with python3.6+.
- #775 - forward Cargo exit code to host
- #762 - re-enabled `x86_64-unknown-dragonfly` target.
- #747 - reduced android image sizes.
- #746 - limit image permissions for android images.
- #377 - update WINE versions to 7.0.
- #734 - patch `arm-unknown-linux-gnueabihf` to build for ARMv6, and add architecture for crosstool-ng-based images.
- #709 - Update Emscripten targets to `emcc` version 3.1.10
- #707, #708 - Set `BINDGEN_EXTRA_CLANG_ARGS` environment variable to pass sysroot to `rust-bindgen`
- #696 - bump freebsd to 12.3
- #629 - Update Android NDK version and API version
- #497 - don't set RUSTFLAGS in aarch64-musl image
- #492 - Add cmake to FreeBSD images
- #748 - allow definitions in the environment variable passthrough
### Fixed
- #836 - write a `CACHEDIR.TAG` when creating the target directory, similar to `cargo`.
- #804 - allow usage of env `CARGO_BUILD_TARGET` as an alias for `CROSS_BUILD_TARGET`
- #792 - fixed container-in-container support when using podman.
- #781 - ensure `target.$(...)` config options override `build` ones.
- #771 - fix parsing of `DOCKER_OPTS`.
- #727 - add `PKG_CONFIG_PATH` to all `*-linux-gnu` images.
- #722 - boolean environment variables are evaluated as truthy or falsey.
- #720 - add android runner to preload `libc++_shared.so`.
- #725 - support `CROSS_DEBUG` and `CROSS_RUNNER` on android images.
- #714 - use host target directory when falling back to host cargo.
- #713 - convert relative target directories to absolute paths.
- #501 (reverted, see #764) - x86_64-linux: lower glibc version requirement to 2.17 (compatible with centos 7)
- #500 - use runner setting specified in Cross.toml
- #498 - bump linux-image version to fix CI
- Re-enabled `powerpc64-unknown-linux-gnu` image
- Re-enabled `sparc64-unknown-linux-gnu` image
- #582 - Added `libprocstat.so` to FreeBSD images
- #665 - when not using [env.volumes](https://github.com/cross-rs/cross#mounting-volumes-into-the-build-environment), mount project in /project
- #494 - Parse Cargo's --manifest-path option to determine mounted docker root
### Removed
- #718 - remove deb subcommand.
### Internal
- #856 - remove use of external wslpath and create internal helper that properly handles UNC paths.
- #828 - assume paths are Unicode and provide better error messages for path encoding errors.
- #787 - add installer for git hooks.
- #786, #791 - Migrate build script to rust: `cargo build-docker-image $TARGET`
- #730 - make FreeBSD builds more resilient.
- #670 - Use serde for deserialization of Cross.toml
- Change rust edition to 2021 and bump MSRV for the cross binary to 1.58.1
- #654 - Use color-eyre for error reporting
- #658 - Upgrade dependencies
- #652 - Allow trying individual targets via bors.
- #650 - Improve Docker caching.
- #609 - Switch to Github Actions and GHCR.
- #588 - fix ci: bump openssl version in freebsd again
- #552 - Added CHANGELOG.md automation
- #534 - fix image builds with update of dependencies
- #502 - fix ci: bump openssl version in freebsd
- #489 - Add support for more hosts and simplify/unify host support checks
- #477 - Fix Docker/Podman links in README
- #476 - Use Rustlang mirror for Sabotage linux tarballs
- Bump nix dependency to `0.22.1`
- Bump musl version to 1.1.24.
## [v0.2.1] - 2020-06-30
- Disabled `powerpc64-unknown-linux-gnu` image.
- Disabled `sparc64-unknown-linux-gnu` image.
- Disabled `x86_64-unknown-dragonfly` image.
- Removed CI testing for `i686-apple-darwin`.
## [v0.2.0] - 2020-02-22
- Removed OpenSSL from all images.
- Added support for Podman.
- Bumped all images to at least Ubuntu 16.04.
## [v0.1.16] - 2019-09-17
- Bump OpenSSL version to 1.0.2t.
- Re-enabled `asmjs-unknown-emscripten` target.
- Default to `native` runner instead of `qemu-user` for certain targets.
## [v0.1.15] - 2019-09-04
- Images are now hosted at <https://hub.docker.com/r/rustembedded/cross>.
- Bump OpenSSL version to 1.0.2p.
- Bump musl version to 1.1.20.
- Bump Ubuntu to 18.04 to all musl targets.
- Bump gcc version to 6.3.0 for all musl targets.
- OpenSSL support for the `arm-unknown-linux-musleabi` target.
- OpenSSL support for the `armv7-unknown-linux-musleabihf` target.
- Build and test support for `aarch64-unknown-linux-musl`, `arm-unknown-linux-musleabihf`,
`armv5te-unknown-linux-musleabi`, `i586-unknown-linux-musl`, `mips-unknown-linux-musl`,
add `mipsel-unknown-linux-musl` targets.
## [v0.1.14] - 2017-11-22
### Added
- Support for the `i586-unknown-linux-gnu` target.
### Changed
- Downgraded the Solaris toolchains from 2.11 to 2.10 to make the binaries produced by Cross more
compatible (this version matches what rust-lang/rust is using).
## [v0.1.13] - 2017-11-08
### Added
- Support for the custom [`deb`] subcommand.
[`deb`]: https://github.com/mmstick/cargo-deb
- Partial `test` / `run` support for android targets. Using the android API via `cross run` / `cross test` is _not_ supported because Cross is using QEMU instead of the official Android emulator.
- Partial support for the `sparcv9-sun-solaris` and `x86_64-sun-solaris` targets. `cross test` and
`cross run` doesn't work for these new targets.
- OpenSSL support for the `i686-unknown-linux-musl` target.
### Changed
- Bump OpenSSL version to 1.0.2m.
## [v0.1.12] - 2017-09-22
### Added
- Support for `cross check`. This subcommand won't use any Docker container.
### Changed
- `binfmt_misc` is not required on the host for toolchain v1.19.0 and newer.
With these toolchains `binfmt_misc` interpreters don't need to be installed
on the host saving a _privileged_ docker run which some systems don't allow.
## [v0.1.11] - 2017-06-10
### Added
- Build and test support for `i686-pc-windows-gnu`, `x86_64-pc-windows-gnu`,
`asmjs-unknown-emscripten` and `wasm-unknown-emscripten`.
- Build support for `aarch64-linux-android`, `arm-linux-androideabi`,
`armv7-linux-androideabi`, `x86_64-linux-android` and `i686-linux-android`
- A `build.env.passthrough` / `build.target.*.passthrough` option to Cross.toml
to support passing environment variables from the host to the Docker image.
### Changed
- Bumped OpenSSL version to 1.0.2k
- Bumped QEMU version to 2.9.0
## [v0.1.10] - 2017-04-02
### Added
- Cross compilation support for `x86_64-pc-windows-gnu`
- Cross compilation support for Android targets
### Changed
- Bumped OpenSSL version to 1.0.2k
## [v0.1.9] - 2017-02-08
### Added
- Support for ARM MUSL targets.
### Changed
- The automatic lockfile update that happens every time `cross` is invoked
should no longer hit the network when there's no git dependency to add/update.
- The QEMU_STRACE variable is passed to the underlying Docker container. Paired
with `cross run`, this lets you get a trace of system call from the execution
of "foreign" (non x86_64) binaries.
## [v0.1.8] - 2017-01-21
### Added
- Support for custom targets. Cross will now also try to use a docker image for
them. As with the built-in targets, one can override the image using
`[target.{}.image]` in Cross.toml.
### Changed
- Moved to a newer Xargo: v0.3.5
## [v0.1.7] - 2017-01-19
### Changed
- Moved to a newer Xargo: v0.3.4
### Fixed
- QEMU interpreters were being register when not required, e.g. for the
`x86_64-unknown-linux-gnu` target.
## [v0.1.6] - 2017-01-14
### Fixed
- Stable releases were picking the wrong image (wrong tag: 0.1.5 instead of
v0.1.5)
## [v0.1.5] - 2017-01-14 [YANKED]
### Added
- `cross run` support for the thumb targets.
- A `build.xargo` / `target.$TARGET.xargo` option to Cross.toml to use Xargo
instead of Cargo.
- A `target.$TARGET.image` option to override the Docker image used for
`$TARGET`.
- A `sparc64-unknown-linux-gnu` environment.
- A `x86_64-unknown-dragonfly` environment.
### Changed
- Building older versions (<0.7.0) of the `openssl` crate is now supported.
- Before Docker is invoked, `cross` will _always_ (re)generate the lockfile to
avoid errors later on due to read/write permissions. This removes the need to
call `cargo generate-lockfile` before `cross` in _all_ cases.
## [v0.1.4] - 2017-01-07
### Added
- Support for the `arm-unknown-linux-gnueabi` target
- `cross build` support for:
- `i686-unknown-freebsd`
- `x86_64-unknown-freebsd`
- `x86_64-unknown-netbsd`
### Changed
- It's no longer necessary to call `cargo generate-lockfile` before using
`cross` as `cross` will now take care of creating a lockfile when necessary.
- The C environments for the `thumb` targets now include newlib (`libc.a`,
`libm.a`, etc.)
### Fixed
- A segfault when `cross` was trying to figure out the name of the user that
called it.
## [v0.1.3] - 2017-01-01
### Changed
- Fix the `i686-unknown-linux-musl` target
## [v0.1.2] - 2016-12-31
### Added
- Support for `i686-unknown-linux-musl`
- Support for `cross build`ing crates for the `thumbv*-none-eabi*` targets.
## [v0.1.1] - 2016-12-28
### Added
- Support for `x86_64-unknown-linux-musl`
- Print shell commands when the verbose flag is used.
- Support crossing from x86_64 osx to i686 osx
## v0.1.0 - 2016-12-26
- Initial release. Supports 12 targets.
<!-- prettier-ignore-start -->
<!-- next-url -->
[Unreleased]: https://github.com/cross-rs/cross/compare/v0.2.5...HEAD
[v0.2.5]: https://github.com/cross-rs/cross/compare/v0.2.4...v0.2.5
[v0.2.4]: https://github.com/cross-rs/cross/compare/v0.2.3...v0.2.4
[v0.2.3]: https://github.com/cross-rs/cross/compare/v0.2.2...v0.2.3
[v0.2.2]: https://github.com/cross-rs/cross/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/cross-rs/cross/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/cross-rs/cross/compare/v0.1.16...v0.2.0
[v0.1.16]: https://github.com/cross-rs/cross/compare/v0.1.15...v0.1.16
[v0.1.15]: https://github.com/cross-rs/cross/compare/v0.1.14...v0.1.15
[v0.1.14]: https://github.com/cross-rs/cross/compare/v0.1.13...v0.1.14
[v0.1.13]: https://github.com/cross-rs/cross/compare/v0.1.12...v0.1.13
[v0.1.12]: https://github.com/cross-rs/cross/compare/v0.1.11...v0.1.12
[v0.1.11]: https://github.com/cross-rs/cross/compare/v0.1.10...v0.1.11
[v0.1.10]: https://github.com/cross-rs/cross/compare/v0.1.9...v0.1.10
[v0.1.9]: https://github.com/cross-rs/cross/compare/v0.1.8...v0.1.9
[v0.1.8]: https://github.com/cross-rs/cross/compare/v0.1.7...v0.1.8
[v0.1.7]: https://github.com/cross-rs/cross/compare/v0.1.6...v0.1.7
[v0.1.6]: https://github.com/cross-rs/cross/compare/v0.1.5...v0.1.6
[v0.1.5]: https://github.com/cross-rs/cross/compare/v0.1.4...v0.1.5
[v0.1.4]: https://github.com/cross-rs/cross/compare/v0.1.3...v0.1.4
[v0.1.3]: https://github.com/cross-rs/cross/compare/v0.1.2...v0.1.3
[v0.1.2]: https://github.com/cross-rs/cross/compare/v0.1.1...v0.1.2
[v0.1.1]: https://github.com/cross-rs/cross/compare/v0.1.0...v0.1.1
<!-- prettier-ignore-end -->
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# The Rust Code of Conduct
## Conduct
* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
* Please be kind and courteous. There's no need to be mean or rude.
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior. We interpret the term "harassment" as including the definition in the [Citizen Code of Conduct](http://citizencodeofconduct.org/); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Tools team][team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.
## Moderation
These are the policies for upholding our community's standards of conduct.
1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
3. Moderators will first respond to such remarks with a warning.
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.
In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.
And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.
The enforcement policies listed above apply to the cross-rs [GitHub repositories]
and the cross-rs [Matrix room].
*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).*
[team]: https://github.com/cross-rs
[GitHub repositories]: https://github.com/cross-rs
[Matrix room]: https://matrix.to/#/#cross-rs:matrix.org
================================================
FILE: CONTRIBUTING.md
================================================
Thank you for looking to contribute to cross. Have a new feature you'd like to add? Know how to fix an open bug? Want to add an image for a new target? We host documentation for how to contribute on our [wiki](https://github.com/cross-rs/cross/wiki/Contributing).
Please read our [code of conduct](https://github.com/cross-rs/cross/blob/main/CODE_OF_CONDUCT.md) so our community stays positive and welcoming. If you have any additional questions, please feel free to ask in either our [discussions](https://github.com/cross-rs/cross/discussions) or our [Matrix room](https://matrix.to/#/#cross-rs:matrix.org).
<!--
NOTE: we don't have specific information provided here since this
would require us to check the contributing changes into our Git
history and therefore CI, which would make any changes to the
repository require separate commits or additional changes to the
code base, making either more difficult for new contributors or
adding unnecessary commits.
-->
================================================
FILE: Cargo.toml
================================================
[package]
build = "src/build.rs"
description = "Zero setup cross compilation and cross testing"
documentation = "https://github.com/cross-rs/cross"
keywords = ["cross", "compilation", "testing", "tool"]
license = "MIT OR Apache-2.0"
name = "cross"
repository = "https://github.com/cross-rs/cross"
version = "0.2.5"
edition = "2021"
include = [
"src/**/*",
"docs/*.md",
"Cargo.toml",
"Cargo.lock",
"LICENSE*",
"README.md",
"assets/*",
]
rust-version = "1.92.0"
[features]
default = []
dev = []
[workspace]
members = ["xtask"]
[dependencies]
is-terminal = "0.4.2"
clap = { version = "4.1.4", features = ["derive"] }
color-eyre = { version = "0.6.5", default-features = false, features = ["track-caller"] }
eyre = "0.6.8"
thiserror = "2.0"
home = "0.5.4"
rustc_version = "0.4.0"
toml = "0.9"
which = "8.0"
shell-escape = "0.1.5"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = { version = "1.0.91", features = ["raw_value"] }
serde_ignored = "0.1.7"
shell-words = "1.1.0"
const-sha1 = "0.3"
signal-hook = { version = "0.4" }
directories = "6.0"
walkdir = { version = "2.3.2", optional = true }
tempfile = "3.3.0"
owo-colors = { version = "4.0", features = ["supports-colors"] }
semver = "1.0.16"
is_ci = "1.1.1"
[target.'cfg(not(windows))'.dependencies]
nix = { version = "0.30", default-features = false, features = ["user"] }
libc = "0.2.139"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["winbase"] }
dunce = "1.0.3"
[profile.release]
lto = true
[dev-dependencies]
regex = "1.7.1"
once_cell = "1.17.0"
ignore = "0.4.20"
[package.metadata.release]
push = false
publish = false
tag = false
consolidate-commits = false
pre-release-hook = ["cargo", "xtask", "changelog", "build", "--release", "{{version}}"]
pre-release-commit-message = "release version {{version}}"
[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = "\\.\\.\\.HEAD"
replace = "...v{{version}}"
exactly = 1
[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = "<!-- next-url -->"
replace = "<!-- next-url -->\n\n[Unreleased]: https://github.com/cross-rs/{{crate_name}}/compare/v{{version}}...HEAD"
exactly = 1
[[package.metadata.release.pre-release-replacements]]
file = "docs/config_file.md"
search = "(# Translates to `.*?:).*?(-centos`)"
replace = "${1}{{version}}$2"
exactly = 1
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.tar.gz"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"
================================================
FILE: LICENSE-APACHE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
================================================
FILE: LICENSE-MIT
================================================
Copyright (c) 2017-2022 by the respective authors
Copyright (c) 2016 Jorge Aparicio
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
[](https://crates.io/crates/cross)
[](https://crates.io/crates/cross)
[](https://github.com/cross-rs/cross/actions/workflows/ci.yml?query=branch)
[](https://matrix.to/#/#cross-rs:matrix.org)
# `cross`
> “Zero setup” cross compilation and “cross testing” of Rust crates
This project is developed and maintained by the [cross-rs] team.
It was previously maintained by the Rust Embedded Working Group Tools team.
New contributors are welcome! Please join our [Matrix room] and say hi.
<p align="center">
<img
alt="`cross test`ing a crate for the aarch64-unknown-linux-gnu target"
src="assets/cross-test.png"
title="`cross test`ing a crate for the aarch64-unknown-linux-gnu target"
>
<br>
<em>`cross test`ing a crate for the aarch64-unknown-linux-gnu target</em>
</p>
## Features
- `cross` will provide all the ingredients needed for cross compilation without
touching your system installation.
- `cross` provides an environment, cross toolchain and cross compiled libraries,
that produces the most portable binaries.
- “cross testing”, `cross` can test crates for architectures other than i686 and
x86_64.
- The stable, beta and nightly channels are supported.
## Dependencies
See our [Getting Started](./docs/getting-started.md) guide for detailed
installation instructions.
- [rustup](https://rustup.rs/)
- A Linux kernel with [binfmt_misc] support is required for cross testing.
One of these container engines is required. If both are installed, `cross` will
default to `docker`.
- [Docker]. Note that on Linux non-sudo users need to be in the `docker` group or use rootless docker.
Read the container engine [install guide][docker_install] for the required installation and post-installation steps. Requires version 20.10 (API 1.40) or later.
- [Podman]. Requires version 3.4.0 or later.
## Installation
```sh
cargo install cross --git https://github.com/cross-rs/cross
```
It's also possible to directly download the pre-compiled [release
binaries](https://github.com/cross-rs/cross/releases) or use
[cargo-binstall](https://github.com/cargo-bins/cargo-binstall).
## Usage
`cross` has the exact same CLI as [Cargo](https://github.com/rust-lang/cargo)
but relies on Docker or Podman. For Docker, you'll have to start
the daemon before you can use it.
```
# (ONCE PER BOOT, on Linux)
# Start the Docker daemon, if it's not already running using systemd
# on WSL2 and other systems using SysVinit, use `sudo service docker start`.
$ sudo systemctl start docker
# MAGIC! This Just Works
$ cross build --target aarch64-unknown-linux-gnu
# EVEN MORE MAGICAL! This also Just Works
$ cross test --target mips64-unknown-linux-gnuabi64
# Obviously, this also Just Works
$ cross rustc --target powerpc-unknown-linux-gnu --release -- -C lto
```
Additional documentation can be found on the
[wiki](https://github.com/cross-rs/cross/wiki) or the `docs/` subfolder.
## Configuration
### Configuring cross behavior
You have four options to configure `cross`. All of these options use the TOML
format for configuration and the possible configuration values are documented
[here][config_file].
#### Option 1: Configuring `cross` directly in your `Cargo.toml`
You can directly set [configuration values][config_file] in your `Cargo.toml`
file, under the `[workspace.metadata.cross]` table, i.e. key prefix. An example
config snippet would look like this:
```toml,cargo
[workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
# Install libssl-dev:arm64, see <https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images>
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH"
]
[workspace.metadata.cross.target.armv7-unknown-linux-gnueabi]
image = "my/image:latest"
[workspace.metadata.cross.build]
env.volumes = ["A_DIRECTORY=/path/to/volume"]
```
#### Option 2: Configuring `cross` via a `Cross.toml` file
You can put your [configuration][config_file] inside a `Cross.toml` file
in your project root directory.
#### Option 3: Using `CROSS_CONFIG` to specify the location of your configuration
By setting the `CROSS_CONFIG` environment variable, you can tell `cross` where
it should search for the config file. This way you are not limited to a
`Cross.toml` file in the project root.
#### Option 4: Configuring `cross` through environment variables
Besides the TOML-based configuration files, config can be passed through
[environment variables][docs_env_vars], too.
### Docker in Docker
When running `cross` from inside a container, `cross` needs access to
the hosts docker daemon itself. This is normally achieved by mounting the
docker daemons socket `/var/run/docker.sock`. For example:
```
$ docker run -v /var/run/docker.sock:/var/run/docker.sock -v .:/project \
-w /project my/development-image:tag cross build --target mips64-unknown-linux-gnuabi64
```
The image running `cross` requires the rust development tools to be installed.
With this setup `cross` must find and mount the correct host paths into the
container used for cross compilation. This includes the original project
directory as well as the root path of the parent container to give access to
the rust build tools.
To inform `cross` that it is running inside a container set
`CROSS_CONTAINER_IN_CONTAINER=true`.
A development or CI container can be created like this:
```
FROM rust:1
# set CROSS_CONTAINER_IN_CONTAINER to inform `cross` that it is executed from within a container
ENV CROSS_CONTAINER_IN_CONTAINER=true
# install `cross`
RUN cargo install cross
...
```
**Limitations**: Finding the mount point for the containers root directory is
currently only available for the overlayfs2 storage driver. In order to access
the parent containers rust setup, the child container mounts the parents
overlayfs. The parent must not be stopped before the child container, as the
overlayfs can not be unmounted correctly by Docker if the child container still
accesses it.
### Explicitly choose the container engine
By default, `cross` tries to use [Docker] or [Podman], in that order.
If you want to choose a container engine explicitly, you can set the
binary name (or path) using the `CROSS_CONTAINER_ENGINE`
environment variable.
For example in case you want use [Podman], you can set `CROSS_CONTAINER_ENGINE=podman`.
## Supported targets
A target is considered as “supported” if `cross` can cross compile a
“non-trivial” (binary) crate, usually Cargo, for that target.
Testing support (`cross test`) is more complicated. It relies on [QEMU]
emulation, so testing may fail due to QEMU bugs rather than bugs in your crate.
That said, a target has a ✓ in `test` column of the table below if it can run
the [`compiler-builtins`] test suite.
[QEMU]: https://www.qemu.org/
[`compiler-builtins`]: https://github.com/rust-lang-nursery/compiler-builtins
Also, testing is very slow. `cross test` runs units tests *sequentially* because
QEMU gets upset when you spawn multiple threads. This means that, if one of your
unit tests spawns threads, then it's more likely to fail or, worst, never
terminate.
| Target | libc | GCC | C++ | QEMU | `test` |
|----------------------------------------|-------:|-------:|:---:|------:|:------:|
| `aarch64-linux-android` [1] | 9.0.8 | 9.0.8 | ✓ | 6.1.0 | ✓ |
| `aarch64-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `aarch64-unknown-linux-gnu:centos` [7] | 2.17 | 4.8.5 | | 4.2.1 | ✓ |
| `aarch64-unknown-linux-musl` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `aarch64_be-unknown-linux-gnu` | 2.36 | 14.2.0 | ✓ | 6.1.0 | ✓ |
| `arm-linux-androideabi` [1] | 9.0.8 | 9.0.8 | ✓ | 6.1.0 | ✓ |
| `arm-unknown-linux-gnueabi` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `arm-unknown-linux-gnueabihf` | 2.31 | 8.5.0 | ✓ | 6.1.0 | ✓ |
| `arm-unknown-linux-musleabi` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `arm-unknown-linux-musleabihf` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `armv5te-unknown-linux-gnueabi` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `armv5te-unknown-linux-musleabi` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `armv7-linux-androideabi` [1] | 9.0.8 | 9.0.8 | ✓ | 6.1.0 | ✓ |
| `armv7-unknown-linux-gnueabi` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `armv7-unknown-linux-gnueabihf` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `armv7-unknown-linux-musleabi` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `armv7-unknown-linux-musleabihf` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `i586-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | N/A | ✓ |
| `i586-unknown-linux-musl` | 1.2.3 | 9.2.0 | ✓ | N/A | ✓ |
| `i686-unknown-freebsd` | 1.6 | 13.3.0 | ✓ | N/A | |
| `i686-linux-android` [1] | 9.0.8 | 9.0.8 | ✓ | 6.1.0 | ✓ |
| `i686-pc-windows-gnu` | N/A | 9.4 | ✓ | N/A | ✓ |
| `i686-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `loongarch64-unknown-linux-gnu` | 2.36 | 14.2.0 | ✓ | 8.2.2 | ✓ |
| `loongarch64-unknown-linux-musl` | 1.2.5 | 14.2.0 | ✓ | 8.2.2 | ✓ |
| `mips-unknown-linux-gnu` | 2.30 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `mips-unknown-linux-musl` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `mips64-unknown-linux-gnuabi64` | 2.30 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `mips64-unknown-linux-muslabi64` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `mips64el-unknown-linux-gnuabi64` | 2.30 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `mips64el-unknown-linux-muslabi64` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `mipsel-unknown-linux-gnu` | 2.30 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `mipsel-unknown-linux-musl` | 1.2.3 | 9.2.0 | ✓ | 6.1.0 | ✓ |
| `powerpc-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `powerpc64-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `powerpc64le-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `riscv64gc-unknown-linux-gnu` | 2.35 | 11.4.0 | ✓ | 8.2.2 | ✓ |
| `riscv64gc-unknown-linux-musl` | 1.2.5 | 14.2.0 | ✓ | 8.2.2 | ✓ |
| `s390x-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `sparc64-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `sparcv9-sun-solaris` | 1.22.7 | 8.4.0 | ✓ | N/A | |
| `thumbv6m-none-eabi` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `thumbv7em-none-eabi` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `thumbv7em-none-eabihf` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `thumbv7m-none-eabi` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `thumbv7neon-linux-androideabi` [1] | 9.0.8 | 9.0.8 | ✓ | 6.1.0 | ✓ |
| `thumbv7neon-unknown-linux-gnueabihf` | 2.31 | 9.4.0 | ✓ | N/A | ✓ |
| `thumbv8m.base-none-eabi` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `thumbv8m.main-none-eabi` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `thumbv8m.main-none-eabihf` [4] | 3.3.0 | 9.2.1 | | N/A | |
| `wasm32-unknown-emscripten` [6] | 3.1.14 | 15.0.0 | ✓ | N/A | ✓ |
| `x86_64-linux-android` [1] | 9.0.8 | 9.0.8 | ✓ | 6.1.0 | ✓ |
| `x86_64-pc-windows-gnu` | N/A | 9.3 | ✓ | N/A | ✓ |
| `x86_64-pc-solaris` | 1.22.7 | 8.4.0 | ✓ | N/A | |
| `x86_64-unknown-freebsd` | 1.6 | 13.3.0 | ✓ | N/A | |
| `x86_64-unknown-dragonfly` [2] [3] | 6.0.1 | 10.3.0 | ✓ | N/A | |
| `x86_64-unknown-illumos` | 1.20.4 | 8.4.0 | ✓ | N/A | |
| `x86_64-unknown-linux-gnu` | 2.31 | 9.4.0 | ✓ | 6.1.0 | ✓ |
| `x86_64-unknown-linux-gnu:centos` [5] | 2.17 | 4.8.5 | ✓ | 4.2.1 | ✓ |
| `x86_64-unknown-linux-musl` | 1.2.3 | 9.2.0 | ✓ | N/A | ✓ |
| `x86_64-unknown-netbsd` [3] | 9.2.0 | 9.4.0 | ✓ | N/A | |
<!--| `asmjs-unknown-emscripten` [7] | 3.1.14 | 15.0.0 | ✓ | N/A | ✓ |-->
[1] libc = bionic; Only works with native tests, that is, tests that do not
depends on the Android Runtime. For i686 some tests may fails with the
error `assertion failed: signal(libc::SIGPIPE, libc::SIG_IGN) !=
libc::SIG_ERR`, see [issue
#140](https://github.com/cross-rs/cross/issues/140) for more information.
[2] No `std` component available.
[3] For some \*BSD and Solaris targets, the libc column indicates the OS
release version from which libc was extracted.
[4] libc = newlib
[5] Must change
`image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"` in
`Cross.toml` for `[target.x86_64-unknown-linux-gnu]` to use the
CentOS7-compatible target.
[6] libc = emscripten and GCC = clang
[7] Must change
`image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos"` in
`Cross.toml` for `[target.aarch64-unknown-linux-gnu]` to use the
CentOS7-compatible target.
<!--[7] libc = emscripten and GCC = clang. The Docker images for these targets are currently not built automatically
due to a [compiler bug](https://github.com/rust-lang/rust/issues/98216), you will have to build them yourself for now.-->
Additional Dockerfiles for other targets can be found in
[cross-toolchains](https://github.com/cross-rs/cross-toolchains). These include
MSVC and Apple Darwin targets, which we cannot ship pre-built images of.
## Debugging
### QEMU_STRACE (v0.1.9+)
You can set the QEMU_STRACE variable when you use `cross run` to get a backtrace
of system calls from “foreign” (non x86_64) binaries.
```
$ cargo new --bin hello && cd $_
$ QEMU_STRACE=1 cross run --target aarch64-unknown-linux-gnu
9 brk(NULL) = 0x0000004000023000
9 uname(0x4000823128) = 0
(..)
9 write(1,0xa06320,14)Hello, world!
= 14
9 sigaltstack(0x4000823588,(nil)) = 0
9 munmap(0x0000004000b16000,16384) = 0
9 exit_group(0)
```
## Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on stable Rust 1.92.0 and up. It *might*
compile with older versions but that may change in any new patch release.
Some cross-compilation targets require a later Rust version, and using Xargo
requires a nightly Rust toolchain.
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT License ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
## Code of Conduct
Contribution to this crate is organized under the terms of the [Rust Code of
Conduct][CoC], the maintainer of this crate, the [cross-rs] team, promises
to intervene to uphold that code of conduct.
[CoC]: CODE_OF_CONDUCT.md
[cross-rs]: https://github.com/cross-rs
[Docker]: https://www.docker.com
[Podman]: https://podman.io
[Matrix room]: https://matrix.to/#/#cross-rs:matrix.org
[docker_install]: https://github.com/cross-rs/cross/wiki/Getting-Started#installing-a-container-engine
[binfmt_misc]: https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
[config_file]: ./docs/config_file.md
[docs_env_vars]: ./docs/environment_variables.md
================================================
FILE: ci/build_release.sh
================================================
#!/usr/bin/env bash
set -eux
cargo install --path . --force
if [[ "${TARGET}" = "x86_64-unknown-linux-gnu" ]]; then
# for this particular target, `cross` command below will try to reuse the artifacts (e.g. build
# script binaries) generated by the previous `cargo` command. that will fail to run because the
# cross environment has glibc 2.17 and the CI env (ubuntu 20.04) produces binaries that depend
# on glibc 2.18+
# to avoid the issue discard the build script artifacts produced by the previous command
cargo clean
fi
cross build --target "${TARGET}" --release
rm -rf "${BUILD_BINARIESDIRECTORY}"
mkdir "${BUILD_BINARIESDIRECTORY}"
if [[ -f "target/${TARGET}/release/cross.exe" ]]; then
mv "target/${TARGET}/release/cross.exe" "${BUILD_BINARIESDIRECTORY}/"
else
mv "target/${TARGET}/release/cross" "${BUILD_BINARIESDIRECTORY}/"
fi
================================================
FILE: ci/shared.sh
================================================
#!/usr/bin/env bash
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
PROJECT_HOME=$(dirname "${ci_dir}")
export PROJECT_HOME
CARGO_TMP_DIR="${PROJECT_HOME}/target/tmp"
export CARGO_TMP_DIR
if [[ -n "${CROSS_CONTAINER_ENGINE}" ]]; then
CROSS_ENGINE="${CROSS_CONTAINER_ENGINE}"
elif command -v docker >/dev/null 2>&1; then
CROSS_ENGINE=docker
else
CROSS_ENGINE=podman
fi
export CROSS_ENGINE
function retry {
local tries="${TRIES-5}"
local timeout="${TIMEOUT-1}"
local try=0
local exit_code=0
while (( try < tries )); do
if "${@}"; then
return 0
else
exit_code=$?
fi
sleep "${timeout}"
echo "Retrying ..." 1>&2
try=$(( try + 1 ))
timeout=$(( timeout * 2 ))
done
return ${exit_code}
}
function mkcargotemp {
local td=
td="$CARGO_TMP_DIR"/$(mktemp -u "${@}" | xargs basename)
mkdir -p "$td"
echo '# Cargo.toml
[workspace]
members = ["'"$(basename "$td")"'"]
' > "$CARGO_TMP_DIR"/Cargo.toml
echo "$td"
}
function binary_path() {
local binary="${1}"
local home="${2}"
local build_mode="${3}"
local cross="${home}/target/${build_mode}/${binary}"
case "$OSTYPE" in
msys*|cygwin*)
cross="${cross}.exe"
;;
*)
;;
esac
echo "${cross}"
}
================================================
FILE: ci/test-bisect.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC1091,SC1090
# test to see that custom toolchains work
set -x
set -eo pipefail
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
main() {
local td=
local err=
retry cargo fetch
cargo build
cargo install cargo-bisect-rustc --debug
CROSS=$(binary_path cross "${PROJECT_HOME}" debug)
export CROSS
td="$(mktemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
pushd "${td}"
retry cargo fetch
# shellcheck disable=SC2016
echo '#!/usr/bin/env bash
export CROSS_CUSTOM_TOOLCHAIN=1
"${CROSS}" run --target '"${TARGET}"'
cargo -V | grep 2022-06
' > bisect.sh
chmod +x bisect.sh
if ! err=$(cargo-bisect-rustc --start 2022-07-01 --end 2022-07-03 --script=./bisect.sh --target "${TARGET}" 2>&1); then
if [[ "${err}" != *"does not reproduce the regression"* ]]; then
echo "${err}"
exit 1
fi
else
echo "should have failed, instead succeeded" 1>&2
exit 1
fi
popd
rm -rf "${td}"
}
main
================================================
FILE: ci/test-cross-image.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC2086,SC1091,SC1090
set -x
set -eo pipefail
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
# ^^subst is not supported on macOS bash (bash <4)
# shellcheck disable=SC2155
export TARGET_UPPER=$(echo "$TARGET" | awk '{print toupper($0)}')
if [[ "${IMAGE}" ]]; then
# shellcheck disable=SC2140
export "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE"="${IMAGE}"
fi
if [[ -z "${CROSS_TARGET_CROSS_IMAGE}" ]]; then
CROSS_TARGET_CROSS_IMAGE="ghcr.io/cross-rs/cross:main"
fi
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
main() {
docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
-v /var/run/docker.sock:/var/run/docker.sock \
"${CROSS_TARGET_CROSS_IMAGE}" sh -c '
#!/usr/bin/env sh
td="$(mktemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
cd "${td}"
cross run --target "${TARGET}"
'
td="$(mkcargotemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
cd "${td}"
echo '# Cross.toml
[target.'${TARGET}']
pre-build = ["exit 0"]
' > Cross.toml
docker run --rm -e TARGET -e CROSS_CONTAINER_IN_CONTAINER=1 -e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD:/mount -w /mount \
"${CROSS_TARGET_CROSS_IMAGE}" cross build --target "${TARGET}"
}
main "${@}"
================================================
FILE: ci/test-docker-in-docker.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC1004,SC1091,SC1090
# test to see that running docker-in-docker works
set -x
set -eo pipefail
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
# ^^subst is not supported on macOS bash (bash <4)
# shellcheck disable=SC2155
export TARGET_UPPER=$(echo "$TARGET" | awk '{print toupper($0)}')
if [[ "${IMAGE}" ]]; then
# shellcheck disable=SC2140
export "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE"="${IMAGE}"
fi
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
main() {
docker run --platform linux/amd64 -v "${PROJECT_HOME}":"${PROJECT_HOME}" -w "${PROJECT_HOME}" \
--rm -e TARGET -e TARGET_UPPER -e RUSTFLAGS -e RUST_TEST_THREADS \
-e LLVM_PROFILE_FILE -e CARGO_INCREMENTAL \
-e "CROSS_TARGET_${TARGET_UPPER//-/_}_IMAGE" \
-v /var/run/docker.sock:/var/run/docker.sock \
docker:20.10-dind sh -c '
#!/usr/bin/env sh
set -x
set -euo pipefail
apk add curl
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "${HOME}/.cargo/env"
# building on release is slow
apk add libgcc gcc musl-dev
cargo test --workspace
cargo install --path . --force --debug
export CROSS_CONTAINER_IN_CONTAINER=1
apk add git
td="$(mktemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
cd "${td}"
cross run --target "${TARGET}" --verbose
td="$(mktemp -d)"
git clone --depth 1 https://github.com/cross-rs/test-workspace "${td}"
cd "${td}"
cross build --target "${TARGET}" --workspace \
--manifest-path="./workspace/Cargo.toml" --verbose
eval CROSS_TARGET_${TARGET_UPPER//-/_}_PRE_BUILD="exit" cross build --target "${TARGET}" --workspace \
--manifest-path="./workspace/Cargo.toml" --verbose
cd workspace
cross build --target "${TARGET}" --workspace --verbose
eval CROSS_TARGET_${TARGET_UPPER//-/_}_PRE_BUILD="exit" cross build --target "${TARGET}" --workspace --verbose
cd binary
cross run --target "${TARGET}" --verbose
eval CROSS_TARGET_${TARGET_UPPER//-/_}_PRE_BUILD="exit" cross run --target "${TARGET}" --verbose
'
}
main
================================================
FILE: ci/test-foreign-toolchain.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC1091,SC1090
# test to see that foreign toolchains work
set -x
set -eo pipefail
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
main() {
local td=
retry cargo fetch
cargo build
CROSS=$(binary_path cross "${PROJECT_HOME}" debug)
export CROSS
td="$(mkcargotemp -d)"
pushd "${td}"
cargo init --bin --name foreign_toolchain
# shellcheck disable=SC2016
echo '# Cross.toml
[build]
default-target = "x86_64-unknown-linux-musl"
[target."x86_64-unknown-linux-musl"]
image.name = "alpine:edge"
image.toolchain = ["x86_64-unknown-linux-musl"]
pre-build = ["apk add --no-cache gcc musl-dev"]' >"${CARGO_TMP_DIR}"/Cross.toml
"${CROSS}" run -v
local tmp_basename
tmp_basename=$(basename "${CARGO_TMP_DIR}")
"${CROSS_ENGINE}" images --format '{{.Repository}}:{{.Tag}}' --filter 'label=org.cross-rs.for-cross-target' | grep "cross-custom-${tmp_basename}" | xargs -t "${CROSS_ENGINE}" rmi
echo '# Cross.toml
[build]
default-target = "x86_64-unknown-linux-gnu"
[target.x86_64-unknown-linux-gnu]
pre-build = [
"apt-get update && apt-get install -y libc6 g++-x86-64-linux-gnu libc6-dev-amd64-cross",
]
[target.x86_64-unknown-linux-gnu.env]
passthrough = [
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc",
"CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=/qemu-runner x86_64",
"CC_x86_64_unknown_linux_gnu=x86_64-linux-gnu-gcc",
"CXX_x86_64_unknown_linux_gnu=x86_64-linux-gnu-g++",
]
[target.x86_64-unknown-linux-gnu.image]
name = "ubuntu:20.04"
toolchain = ["aarch64-unknown-linux-gnu"]
' >"${CARGO_TMP_DIR}"/Cross.toml
"${CROSS}" build -v
"${CROSS_ENGINE}" images --format '{{.Repository}}:{{.Tag}}' --filter 'label=org.cross-rs.for-cross-target' | grep "cross-custom-${tmp_basename}" | xargs "${CROSS_ENGINE}" rmi
popd
rm -rf "${td}"
}
main
================================================
FILE: ci/test-podman.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC1091,SC1090
# test to see that running and building images with podman works.
set -x
set -eo pipefail
export CROSS_CONTAINER_ENGINE=podman
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
main() {
local td=
local parent=
local target="${TARGET}"
retry cargo fetch
cargo build
CROSS=$(binary_path cross "${PROJECT_HOME}" debug)
export CROSS
td="$(mkcargotemp -d)"
parent=$(dirname "${td}")
pushd "${td}"
cargo init --bin --name "hello" .
echo '[build]
pre-build = ["apt-get update"]' > "${parent}/Cross.toml"
CROSS_CONTAINER_ENGINE="${CROSS_ENGINE}" "${CROSS}" build --target "${target}" --verbose
popd
rm -rf "${td}"
}
main
================================================
FILE: ci/test-remote.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC1091,SC1090
# test to see that remote docker support works.
set -x
set -eo pipefail
export CROSS_REMOTE=1
if [[ -z "${TARGET}" ]]; then
export TARGET="aarch64-unknown-linux-gnu"
fi
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
main() {
local err=
retry cargo fetch
cargo build
CROSS=$(binary_path cross "${PROJECT_HOME}" debug)
export CROSS
CROSS_UTIL=$(binary_path cross-util "${PROJECT_HOME}" debug)
export CROSS_UTIL
# if the create volume fails, ensure it exists.
if ! err=$("${CROSS_UTIL}" volumes create 2>&1 >/dev/null); then
if [[ "${err}" != *"already exists"* ]]; then
echo "${err}"
exit 1
fi
fi
cross_test_cpp
"${CROSS_UTIL}" volumes remove
# ensure the data volume was removed.
cross_test_cpp
}
cross_test_cpp() {
local td=
td="$(mkcargotemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
pushd "${td}"
retry cargo fetch
"${CROSS}" run --target "${TARGET}" | grep "Hello, world!"
sed -i 's/Hello, world/Hello, test/g' hellopp.cc
"${CROSS}" run --target "${TARGET}" | grep "Hello, test!"
popd
rm -rf "${td}"
}
main
================================================
FILE: ci/test-zig-image.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC2086,SC1091,SC1090
set -x
set -eo pipefail
# NOTE: "${@}" is an unbound variable for bash 3.2, which is the
# installed version on macOS. likewise, "${var[@]}" is an unbound
# error if var is an empty array.
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
# zig cc is very slow: only use a few targets.
TARGETS=(
"aarch64-unknown-linux-gnu"
"aarch64-unknown-linux-musl"
# disabled, see https://github.com/cross-rs/cross/issues/1425
#"i586-unknown-linux-gnu"
#"i586-unknown-linux-musl"
)
# on CI, it sets `CROSS_TARGET_ZIG_IMAGE` rather than `CROSS_BUILD_ZIG_IMAGE`
if [[ -n "${CROSS_TARGET_ZIG_IMAGE}" ]]; then
export CROSS_BUILD_ZIG_IMAGE="${CROSS_TARGET_ZIG_IMAGE}"
unset CROSS_TARGET_ZIG_IMAGE
fi
main() {
export CROSS_BUILD_ZIG=1
local td=
local target=
retry cargo fetch
cargo build
CROSS=$(binary_path cross "${PROJECT_HOME}" debug)
export CROSS
td="$(mktemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
pushd "${td}"
for target in "${TARGETS[@]}"; do
CROSS_CONTAINER_ENGINE="${CROSS_ENGINE}" "${CROSS}" build --target "${target}" --verbose
# note: ensure #724 doesn't replicate during CI.
# https://github.com/cross-rs/cross/issues/724
cargo clean
done
popd
rm -rf "${td}"
}
main "${@}"
================================================
FILE: ci/test.sh
================================================
#!/usr/bin/env bash
# shellcheck disable=SC2086,SC1091,SC1090
set -x
set -eo pipefail
# NOTE: "${@}" is an unbound variable for bash 3.2, which is the
# installed version on macOS. likewise, "${var[@]}" is an unbound
# error if var is an empty array.
ci_dir=$(dirname "${BASH_SOURCE[0]}")
ci_dir=$(realpath "${ci_dir}")
. "${ci_dir}"/shared.sh
workspace_test() {
"${CROSS[@]}" build --target "${TARGET}" --workspace "$@" ${CROSS_FLAGS}
"${CROSS[@]}" run --target "${TARGET}" -p binary "$@" ${CROSS_FLAGS}
"${CROSS[@]}" run --target "${TARGET}" --bin dependencies \
--features=dependencies "$@" ${CROSS_FLAGS}
}
main() {
local td=
retry cargo fetch
cargo build
# Unset RUSTFLAGS
export RUSTFLAGS=""
export QEMU_STRACE=1
# ensure we have the proper toolchain and optional rust flags
CROSS=$(binary_path cross "${PROJECT_HOME}" debug)
export CROSS=("${CROSS}")
export CROSS_FLAGS="-v"
if (( ${BUILD_STD:-0} )); then
# use build-std instead of xargo, due to xargo being
# maintenance-only. build-std requires a nightly compiler
rustup toolchain add nightly
CROSS_FLAGS="${CROSS_FLAGS} -Zbuild-std"
CROSS+=("+nightly")
if [[ "${TARGET}" == *"mips"* ]]; then
# workaround for https://github.com/cross-rs/cross/issues/1322 & https://github.com/rust-lang/rust/issues/108835
[[ ! "$RUSTFLAGS" =~ opt-level ]] && export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C opt-level=1"
fi
elif ! (( ${STD:-0} )); then
# don't use xargo: should have native support just from rustc
rustup toolchain add nightly
CROSS+=("+nightly")
fi
if (( ${STD:-0} )); then
# test `cross check`
td=$(mkcargotemp -d)
cargo init --lib --name foo "${td}"
pushd "${td}"
echo '#![no_std]' > src/lib.rs
"${CROSS[@]}" check --target "${TARGET}" ${CROSS_FLAGS}
popd
rm -rf "${td}"
else
# `cross build` test for targets where `std` is not available
td=$(mkcargotemp -d)
git clone \
--depth 1 \
--recursive \
https://github.com/rust-lang-nursery/compiler-builtins "${td}"
pushd "${td}"
retry cargo fetch
# don't use xargo: should have native support just from rustc
rustup toolchain add nightly
cross_build --lib --target "${TARGET}"
popd
rm -rf "${td}"
fi
# `cross build` test for the other targets
if [[ "${TARGET}" == *-unknown-emscripten ]]; then
td=$(mkcargotemp -d)
pushd "${td}"
cargo init --lib --name foo .
retry cargo fetch
cross_build --target "${TARGET}"
popd
rm -rf "${td}"
# thumb targets are tested in later steps
elif [[ "${TARGET}" != thumb* ]]; then
td=$(mkcargotemp -d)
pushd "${td}"
# test that linking works
cargo init --bin --name hello .
retry cargo fetch
cross_build --target "${TARGET}"
popd
rm -rf "${td}"
fi
if (( ${RUN:-0} )); then
# `cross test` test
if (( ${DYLIB:-0} )); then
td=$(mkcargotemp -d)
pushd "${td}"
cargo init --lib --name foo .
cross_test --target "${TARGET}"
cross_bench --target "${TARGET}"
popd
rm -rf "${td}"
fi
# `cross run` test
case "${TARGET}" in
thumb*-none-eabi*)
td=$(mkcargotemp -d)
git clone \
--depth 1 \
--recursive \
https://github.com/japaric/cortest "${td}"
pushd "${td}"
cross_run --target "${TARGET}" --example hello --release
popd
rm -rf "${td}"
;;
*)
td=$(mkcargotemp -d)
cargo init --bin --name hello "${td}"
pushd "${td}"
mkdir examples tests
echo "fn main() { println!(\"Example!\"); }" > examples/e.rs
echo "#[test] fn t() {}" > tests/t.rs
cross_run --target "${TARGET}"
cross_run --target "${TARGET}" --example e
cross_test --target "${TARGET}"
cross_bench --target "${TARGET}"
popd
rm -rf "${td}"
td=$(mkcargotemp -d)
git clone \
--depth 1 \
--recursive \
https://github.com/cross-rs/test-workspace "${td}"
pushd "${td}"
TARGET="${TARGET}" workspace_test --manifest-path="./workspace/Cargo.toml"
pushd "workspace"
TARGET="${TARGET}" workspace_test
pushd "binary"
"${CROSS[@]}" run --target "${TARGET}" ${CROSS_FLAGS}
popd
popd
popd
;;
esac
fi
# Test C++ support in a no_std context
if (( ${CPP:-0} )); then
td="$(mkcargotemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-accumulate "${td}"
pushd "${td}"
retry cargo fetch
cross_build --target "${TARGET}"
popd
rm -rf "${td}"
fi
# Test C++ support
if (( ${STD:-0} )) && (( ${CPP:-0} )); then
td="$(mkcargotemp -d)"
git clone --depth 1 https://github.com/cross-rs/rust-cpp-hello-word "${td}"
pushd "${td}"
retry cargo fetch
if (( ${RUN:-0} )); then
cross_run --target "${TARGET}"
else
cross_build --target "${TARGET}"
fi
popd
rm -rf "${td}"
fi
# special tests for a shared C runtime, since we disable the shared c++ runtime
# https://github.com/cross-rs/cross/issues/902
if [[ "${TARGET}" == *-linux-musl* ]]; then
td=$(mkcargotemp -d)
pushd "${td}"
cargo init --bin --name hello .
retry cargo fetch
RUSTFLAGS="$RUSTFLAGS -C target-feature=-crt-static" \
cross_build --target "${TARGET}"
popd
rm -rf "${td}"
fi
# test cmake support
td="$(mkcargotemp -d)"
git clone \
--recursive \
--depth 1 \
https://github.com/cross-rs/rust-cmake-hello-world "${td}"
pushd "${td}"
retry cargo fetch
if [[ "${TARGET}" == "arm-linux-androideabi" ]]; then
# ARMv5te isn't supported anymore by Android, which produces missing
# symbol errors with re2 like `__libcpp_signed_lock_free`.
cross_run --target "${TARGET}" --features=tryrun
elif (( ${STD:-0} )) && (( ${RUN:-0} )) && (( ${CPP:-0} )); then
cross_run --target "${TARGET}" --features=re2,tryrun
elif (( ${STD:-0} )) && (( ${CPP:-0} )); then
cross_build --target "${TARGET}" --features=re2
elif (( ${STD:-0} )) && (( ${RUN:-0} )); then
cross_run --target "${TARGET}" --features=tryrun
elif (( ${STD:-0} )); then
cross_build --target "${TARGET}" --features=tryrun
else
cross_build --lib --target "${TARGET}"
fi
popd
rm -rf "${td}"
# test running binaries with cleared environment
# Command is not implemented for wasm32-unknown-emscripten
if (( ${RUN:-0} )) && [[ "${TARGET}" != "wasm32-unknown-emscripten" ]]; then
td="$(mkcargotemp -d)"
pushd "${td}"
cargo init --bin --name foo .
mkdir src/bin
upper_target=$(echo "${TARGET}" | tr '[:lower:]' '[:upper:]' | tr '-' '_')
cat <<EOF > src/bin/launch.rs
fn main() {
let runner = std::env::var("CARGO_TARGET_${upper_target}_RUNNER");
let mut command = if let Ok(runner) = runner {
runner.split(' ').map(str::to_string).collect()
} else {
vec![]
};
let executable = format!("/target/${TARGET}/debug/foo{}", std::env::consts::EXE_SUFFIX);
command.push(executable.to_string());
let status = dbg!(std::process::Command::new(&command[0])
.args(&command[1..])
.env_clear()) // drop all environment variables
.status()
.unwrap();
std::process::exit(status.code().unwrap());
}
EOF
cross_build --target "${TARGET}"
cross_run --target "${TARGET}" --bin launch
popd
rm -rf "${td}"
fi
}
cross_build() {
"${CROSS[@]}" build "$@" ${CROSS_FLAGS}
}
cross_run() {
if [[ -z "${RUNNERS:-}" ]]; then
"${CROSS[@]}" run "$@" ${CROSS_FLAGS}
else
for runner in ${RUNNERS}; do
echo -e "[target.${TARGET}]\nrunner = \"${runner}\"" > "${CARGO_TMP_DIR}"/Cross.toml
"${CROSS[@]}" run "$@" ${CROSS_FLAGS}
done
fi
}
cross_test() {
if [[ -z "${RUNNERS:-}" ]]; then
"${CROSS[@]}" test "$@" ${CROSS_FLAGS}
else
for runner in ${RUNNERS}; do
echo -e "[target.${TARGET}]\nrunner = \"${runner}\"" > "${CARGO_TMP_DIR}"/Cross.toml
"${CROSS[@]}" test "$@" ${CROSS_FLAGS}
done
fi
}
cross_bench() {
if [[ -z "${RUNNERS:-}" ]]; then
"${CROSS[@]}" bench "$@" ${CROSS_FLAGS}
else
for runner in ${RUNNERS}; do
echo -e "[target.${TARGET}]\nrunner = \"${runner}\"" > "${CARGO_TMP_DIR}"/Cross.toml
"${CROSS[@]}" bench "$@" ${CROSS_FLAGS}
done
fi
}
main
================================================
FILE: clippy.toml
================================================
disallowed-methods = [
{ path = "std::path::Path::display", reason = "incorrect handling of non-Unicode paths, use path.to_utf8() or debug (`{path:?}`) instead" },
]
allow-unwrap-in-tests = true
msrv = "1.92.0"
================================================
FILE: crosstool-ng/arm-unknown-linux-gnueabihf.config.in
================================================
CT_CONFIG_VERSION="4"
CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
CT_DOWNLOAD_AGENT_CURL=y
CT_ARCH_ARM=y
CT_ARCH_ARCH="armv6"
CT_ARCH_FPU="vfp"
CT_ARCH_FLOAT_HW=y
CT_KERNEL_LINUX=y
%CT_LINUX_V%
%CT_LINUX%
CT_BINUTILS_V_2_32=y
%CT_GLIBC_V%
%CT_GLIBC%
%CT_GCC_V%
%CT_GCC%
CT_CC_LANG_CXX=y
CT_GETTEXT_V_0_19_8_1=y
CT_GMP_V_6_1=y
CT_ISL_V_0_20=y
CT_LIBICONV_V_1_15=y
CT_NCURSES_V_6_1=y
================================================
FILE: crosstool-ng/loongarch64-unknown-linux-gnu.config.in
================================================
CT_CONFIG_VERSION="4"
CT_EXPERIMENTAL=y
CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
CT_ARCH_LOONGARCH=y
# CT_DEMULTILIB is not set
CT_ARCH_USE_MMU=y
CT_ARCH_ARCH="loongarch64"
CT_KERNEL_LINUX=y
%CT_LINUX_V%
%CT_LINUX%
%CT_GLIBC_V%
%CT_GLIBC%
%CT_GCC_V%
%CT_GCC%
CT_CC_GCC_ENABLE_DEFAULT_PIE=y
CT_CC_LANG_CXX=y
================================================
FILE: crosstool-ng/loongarch64-unknown-linux-musl.config.in
================================================
CT_CONFIG_VERSION="4"
CT_EXPERIMENTAL=y
CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
CT_ARCH_LOONGARCH=y
# CT_DEMULTILIB is not set
CT_ARCH_USE_MMU=y
CT_ARCH_ARCH="loongarch64"
CT_KERNEL_LINUX=y
%CT_LINUX_V%
%CT_LINUX%
CT_LIBC_MUSL=y
%CT_MUSL_V%
%CT_GCC_V%
%CT_GCC%
CT_CC_GCC_ENABLE_DEFAULT_PIE=y
CT_CC_LANG_CXX=y
================================================
FILE: deny.toml
================================================
[graph]
# only check for the targets we currently publish
targets = [
{ triple = "x86_64-apple-darwin" },
{ triple = "x86_64-unknown-linux-gnu" },
{ triple = "x86_64-unknown-linux-musl" },
{ triple = "x86_64-pc-windows-msvc" },
]
[advisories]
version = 2
[bans]
multiple-versions = "deny"
deny = []
skip-tree = [
{ name = "supports-color", depth = 1, version = "2.1.0", reason = "owo-colors pulls in two versions of supports-color" },
]
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-git = []
[licenses]
version = 2
# need this since to suppress errors in case we add crates with these allowed licenses
unused-allowed-license = "allow"
confidence-threshold = 0.93
allow = [
"Apache-2.0",
"MIT",
"CC0-1.0",
"ISC",
"0BSD",
"BSD-2-Clause",
"BSD-3-Clause",
"Unlicense",
"Unicode-DFS-2016",
"Unicode-3.0",
"MPL-2.0",
]
[licenses.private]
ignore = true
================================================
FILE: docker/.dockerignore
================================================
# don't copy any of the python artifacts to the docker context
__pycache__/
.pytest_cache/
*.py[cod]
*$py.class
**/*.egg-info/
*.egg
.tox
# also skip our test suite
android/tests/
================================================
FILE: docker/.gitattributes
================================================
* text eol=lf
================================================
FILE: docker/Dockerfile.aarch64-linux-android
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh aarch64
ARG ANDROID_NDK=r25b
ARG ANDROID_SDK=28
ARG ANDROID_VERSION=9.0.0_r1
ARG ANDROID_SYSTEM_NONE=0
ARG ANDROID_SYSTEM_COMPLETE=0
ARG PYTHON_TMPDIR=/tmp/android
COPY validate-android-args.sh /
RUN /validate-android-args.sh arm64
COPY android-ndk.sh /
RUN /android-ndk.sh arm64
ENV PATH=$PATH:/android-ndk/bin
COPY android-system.sh /
RUN mkdir -p $PYTHON_TMPDIR
COPY android $PYTHON_TMPDIR
RUN /android-system.sh arm64
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-linux-android-
ENV CROSS_SYSROOT=/android-ndk/sysroot
ENV CROSS_ANDROID_SDK=$ANDROID_SDK
COPY android-symlink.sh /
RUN /android-symlink.sh aarch64 aarch64-linux-android
COPY android-runner /
COPY android.cmake /opt/toolchain.cmake
# Libz is distributed in the android ndk, but for some unknown reason it is not
# found in the build process of some crates, so we explicit set the DEP_Z_ROOT
ENV CROSS_TARGET_RUNNER="/android-runner aarch64"
ENV CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER="$CROSS_TARGET_RUNNER" \
AR_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"ar \
AS_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"as \
CC_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"g++ \
LD_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"ld \
NM_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"nm \
OBJCOPY_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"objcopy \
OBJDUMP_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"objdump \
RANLIB_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"ranlib \
READELF_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"readelf \
SIZE_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"size \
STRINGS_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"strings \
STRIP_aarch64_linux_android="$CROSS_TOOLCHAIN_PREFIX"strip \
CMAKE_TOOLCHAIN_FILE_aarch64_linux_android=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_linux_android="--sysroot=$CROSS_SYSROOT" \
DEP_Z_INCLUDE="$CROSS_SYSROOT/usr/include"/ \
RUST_TEST_THREADS=1 \
HOME=/tmp/ \
TMPDIR=/tmp/ \
ANDROID_DATA=/ \
ANDROID_DNS_MODE=local \
ANDROID_ROOT=/system \
CROSS_CMAKE_SYSTEM_NAME=Android \
CROSS_CMAKE_SYSTEM_PROCESSOR=aarch64 \
CROSS_CMAKE_CRT=android \
CROSS_CMAKE_OBJECT_FLAGS="-DANDROID -ffunction-sections -fdata-sections -fPIC"
================================================
FILE: docker/Dockerfile.aarch64-unknown-freebsd
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
RUN echo "export ARCH=aarch64" > /freebsd-arch.sh
COPY freebsd-common.sh /
COPY freebsd.sh /
RUN /freebsd.sh
COPY freebsd-install.sh /
COPY freebsd-extras.sh /
RUN /freebsd-extras.sh
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-unknown-freebsd13-
ENV CROSS_SYSROOT=/usr/local/aarch64-unknown-freebsd13
COPY freebsd-gcc.sh /usr/bin/"$CROSS_TOOLCHAIN_PREFIX"gcc.sh
COPY toolchain.cmake /opt/toolchain.cmake
COPY freebsd-fetch-best-mirror.sh /
COPY freebsd-setup-packagesite.sh /
COPY freebsd-install-package.sh /
ENV CARGO_TARGET_AARCH64_UNKNOWN_FREEBSD_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc.sh \
AR_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_unknown_freebsd="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_freebsd=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_freebsd="--sysroot=$CROSS_SYSROOT" \
AARCH64_UNKNOWN_FREEBSD_OPENSSL_DIR="$CROSS_SYSROOT" \
CROSS_CMAKE_SYSTEM_NAME=FreeBSD \
CROSS_CMAKE_SYSTEM_PROCESSOR=amd64 \
CROSS_CMAKE_CRT=freebsd \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64"
================================================
FILE: docker/Dockerfile.aarch64-unknown-linux-gnu
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-aarch64-linux-gnu \
gfortran-aarch64-linux-gnu \
libc6-dev-arm64-cross
COPY deny-debian-packages.sh /
RUN TARGET_ARCH=arm64 /deny-debian-packages.sh \
binutils \
binutils-aarch64-linux-gnu
COPY qemu.sh /
RUN /qemu.sh aarch64 softmmu
COPY dropbear.sh /
RUN /dropbear.sh
COPY linux-image.sh /
RUN /linux-image.sh aarch64
COPY linux-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-linux-gnu-
ENV CROSS_SYSROOT=/usr/aarch64-linux-gnu
ENV CROSS_TARGET_RUNNER="/linux-runner aarch64"
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="$CROSS_TARGET_RUNNER" \
AR_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_gnu=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=aarch64 \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /linux-runner
================================================
FILE: docker/Dockerfile.aarch64-unknown-linux-gnu.centos
================================================
FROM ubuntu:20.04 AS base
COPY lib.sh /
COPY linux-image.sh /
RUN /linux-image.sh aarch64
FROM centos:7
# From https://github.com/rust-lang/rust/blob/672e3aaf28ab1e5cbe80b3ff012cd3a8e4ef98af/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile#L9-L12
# CentOS 7 EOL is June 30, 2024, but the repos remain in the vault.
RUN sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \
-e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!'
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
COPY qemu.sh /
RUN /qemu.sh aarch64 softmmu
COPY dropbear.sh /
RUN /dropbear.sh
COPY --from=0 /qemu /qemu
COPY linux-runner base-runner.sh /
COPY aarch64-linux-gnu-glibc.sh /
RUN /aarch64-linux-gnu-glibc.sh
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-linux-gnu-
ENV CROSS_SYSROOT=/usr/aarch64-linux-gnu
ENV CROSS_TARGET_RUNNER="/linux-runner aarch64"
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="$CROSS_TARGET_RUNNER" \
AR_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_gnu=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_gnu="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=aarch64 \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /linux-runner
================================================
FILE: docker/Dockerfile.aarch64-unknown-linux-musl
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh aarch64
COPY musl.sh /
RUN /musl.sh TARGET=aarch64-linux-musl
COPY tidyup.sh /
RUN /tidyup.sh
FROM scratch AS final
COPY --from=build / /
CMD ["/bin/bash"]
ENV CROSS_TOOLCHAIN_PREFIX=aarch64-linux-musl-
ENV CROSS_SYSROOT=/usr/local/aarch64-linux-musl
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_SYSROOT aarch64
COPY musl-gcc.sh /usr/bin/"$CROSS_TOOLCHAIN_PREFIX"gcc.sh
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TARGET_RUNNER="/qemu-runner aarch64"
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc.sh \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER="$CROSS_TARGET_RUNNER" \
AR_aarch64_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_aarch64_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_unknown_linux_musl="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_musl=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_musl="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=aarch64 \
CROSS_CMAKE_CRT=musl \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC" \
CROSS_BUILTINS_PATCHED_MINOR_VERSION=48
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.aarch64_be-unknown-linux-gnu
================================================
FROM ubuntu:24.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
ARG VERBOSE
COPY crosstool-ng.sh /
COPY crosstool-config/aarch64_be-unknown-linux-gnu.config /
RUN /crosstool-ng.sh aarch64_be-unknown-linux-gnu.config 5
ENV PATH=/x-tools/aarch64_be-unknown-linux-gnu/bin/:$PATH
COPY qemu.sh /
RUN /qemu.sh aarch64_be
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=aarch64_be-unknown-linux-gnu-
ENV CROSS_SYSROOT=/x-tools/aarch64_be-unknown-linux-gnu/aarch64_be-unknown-linux-gnu/sysroot/
ENV CROSS_TARGET_RUNNER="/qemu-runner aarch64_be"
ENV CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_RUNNER="$CROSS_TARGET_RUNNER" \
AR_aarch64_be_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_aarch64_be_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_be_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_aarch64_be_unknown_linux_gnu=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_be_unknown_linux_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=aarch64_be \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.arm-linux-androideabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh arm
ARG ANDROID_NDK=r25b
ARG ANDROID_SDK=28
ARG ANDROID_VERSION=9.0.0_r1
ARG ANDROID_SYSTEM_NONE=0
ARG ANDROID_SYSTEM_COMPLETE=0
ARG PYTHON_TMPDIR=/tmp/android
COPY validate-android-args.sh /
RUN /validate-android-args.sh arm
COPY android-ndk.sh /
RUN /android-ndk.sh arm
ENV PATH=$PATH:/android-ndk/bin
COPY android-system.sh /
RUN mkdir -p $PYTHON_TMPDIR
COPY android $PYTHON_TMPDIR
RUN /android-system.sh arm
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-androideabi-
ENV CROSS_SYSROOT=/android-ndk/sysroot
ENV CROSS_ANDROID_SDK=$ANDROID_SDK
COPY android-symlink.sh /
RUN /android-symlink.sh arm arm-linux-androideabi
COPY android-runner /
COPY android.cmake /opt/toolchain.cmake
# Libz is distributed in the android ndk, but for some unknown reason it is not
# found in the build process of some crates, so we explicit set the DEP_Z_ROOT
ENV CROSS_TARGET_RUNNER="/android-runner arm"
ENV CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"ar \
AS_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"as \
CC_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
LD_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"ld \
NM_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"nm \
OBJCOPY_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"objcopy \
OBJDUMP_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"objdump \
RANLIB_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"ranlib \
READELF_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"readelf \
SIZE_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"size \
STRINGS_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"strings \
STRIP_arm_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"strip \
CMAKE_TOOLCHAIN_FILE_arm_linux_androideabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_arm_linux_androideabi="--sysroot=$CROSS_SYSROOT" \
DEP_Z_INCLUDE="$CROSS_SYSROOT/usr/include/" \
RUST_TEST_THREADS=1 \
HOME=/tmp/ \
TMPDIR=/tmp/ \
ANDROID_DATA=/ \
ANDROID_DNS_MODE=local \
ANDROID_ROOT=/system \
CROSS_CMAKE_SYSTEM_NAME=Android \
CROSS_CMAKE_SYSTEM_PROCESSOR=armv5te \
CROSS_CMAKE_CRT=android \
CROSS_CMAKE_OBJECT_FLAGS="--target=arm-linux-androideabi -DANDROID -ffunction-sections -fdata-sections -fPIC --target=arm-linux-androideabi"
================================================
FILE: docker/Dockerfile.arm-unknown-linux-gnueabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabi \
gfortran-arm-linux-gnueabi \
libc6-dev-armel-cross
COPY deny-debian-packages.sh /
RUN TARGET_ARCH=armel /deny-debian-packages.sh \
binutils \
binutils-arm-linux-gnueabi
COPY qemu.sh /
RUN /qemu.sh arm
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-gnueabi-
ENV CROSS_SYSROOT=/usr/arm-linux-gnueabi
ENV CROSS_TARGET_RUNNER="/qemu-runner arm"
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_arm_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_arm_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_arm_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_arm_unknown_linux_gnueabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabi="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabi/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfloat-abi=soft"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.arm-unknown-linux-gnueabihf
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
ARG VERBOSE
COPY crosstool-ng.sh /
COPY crosstool-config/arm-unknown-linux-gnueabihf.config /
RUN /crosstool-ng.sh arm-unknown-linux-gnueabihf.config 5
ENV PATH=/x-tools/arm-unknown-linux-gnueabihf/bin/:$PATH
COPY deny-debian-packages.sh /
RUN TARGET_ARCH=armhf /deny-debian-packages.sh
COPY qemu.sh /
RUN /qemu.sh arm
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=arm-unknown-linux-gnueabihf-
ENV CROSS_SYSROOT=/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/
ENV CROSS_TARGET_RUNNER="/qemu-runner armhf"
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="$CROSS_TARGET_RUNNER" \
AR_arm_unknown_linux_gnueabihf="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_arm_unknown_linux_gnueabihf="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_arm_unknown_linux_gnueabihf="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_arm_unknown_linux_gnueabihf=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabihf="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfpu=vfp"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.arm-unknown-linux-musleabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh arm
COPY musl.sh /
RUN /musl.sh \
TARGET=arm-linux-musleabi \
"COMMON_CONFIG += --with-arch=armv6 \
--with-float=soft \
--with-mode=arm"
COPY tidyup.sh /
RUN /tidyup.sh
FROM scratch AS final
COPY --from=build / /
CMD ["/bin/bash"]
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-musleabi-
ENV CROSS_SYSROOT=/usr/local/arm-linux-musleabi
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_SYSROOT arm
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TARGET_RUNNER="/qemu-runner arm"
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_arm_unknown_linux_musleabi="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_arm_unknown_linux_musleabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_arm_unknown_linux_musleabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_arm_unknown_linux_musleabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_musleabi="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=musl \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfloat-abi=soft"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.arm-unknown-linux-musleabihf
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh arm
COPY musl.sh /
RUN /musl.sh \
TARGET=arm-linux-musleabihf \
"COMMON_CONFIG += --with-arch=armv6 \
--with-fpu=vfp \
--with-float=hard \
--with-mode=arm"
COPY tidyup.sh /
RUN /tidyup.sh
FROM scratch AS final
COPY --from=build / /
CMD ["/bin/bash"]
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-musleabihf-
ENV CROSS_SYSROOT=/usr/local/arm-linux-musleabihf
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_SYSROOT armhf
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TARGET_RUNNER="/qemu-runner armhf"
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_RUNNER="$CROSS_TARGET_RUNNER" \
AR_arm_unknown_linux_musleabihf="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_arm_unknown_linux_musleabihf="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_arm_unknown_linux_musleabihf="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_arm_unknown_linux_musleabihf=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_musleabihf="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=musl \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfpu=vfp"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.armv5te-unknown-linux-gnueabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabi \
gfortran-arm-linux-gnueabi \
crossbuild-essential-armel \
libc6-dev-armel-cross
COPY deny-debian-packages.sh /
RUN TARGET_ARCH=armel /deny-debian-packages.sh \
binutils \
binutils-arm-linux-gnueabi
COPY qemu.sh /
RUN /qemu.sh arm
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-gnueabi-
ENV CROSS_SYSROOT=/usr/arm-linux-gnueabi
ENV CROSS_TARGET_RUNNER="/qemu-runner arm"
ENV CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_GNUEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_GNUEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_armv5te_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_armv5te_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_armv5te_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_armv5te_unknown_linux_gnueabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_armv5te_unknown_linux_gnueabi="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabi/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv5te -marm -mfloat-abi=soft"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.armv5te-unknown-linux-musleabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh arm
COPY musl.sh /
RUN /musl.sh TARGET=arm-linux-musleabi "COMMON_CONFIG += --with-arch=armv5te --with-float=soft --with-mode=arm"
COPY tidyup.sh /
RUN /tidyup.sh
FROM scratch AS final
COPY --from=build / /
CMD ["/bin/bash"]
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-musleabi-
ENV CROSS_SYSROOT=/usr/local/arm-linux-musleabi
COPY musl-symlink.sh /
RUN /musl-symlink.sh $CROSS_SYSROOT arm
COPY musl-gcc.sh /usr/bin/"$CROSS_TOOLCHAIN_PREFIX"gcc.sh
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TARGET_RUNNER="/qemu-runner arm"
ENV CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_MUSLEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc.sh \
CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_MUSLEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_armv5te_unknown_linux_musleabi="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_armv5te_unknown_linux_musleabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_armv5te_unknown_linux_musleabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_armv5te_unknown_linux_musleabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_armv5te_unknown_linux_musleabi="--sysroot=$CROSS_SYSROOT" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=musl \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv5te -marm -mfloat-abi=soft" \
CROSS_BUILTINS_PATCHED_MINOR_VERSION=65
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.armv7-linux-androideabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COPY qemu.sh /
RUN /qemu.sh arm
ARG ANDROID_NDK=r25b
ARG ANDROID_SDK=28
ARG ANDROID_VERSION=9.0.0_r1
ARG ANDROID_SYSTEM_NONE=0
ARG ANDROID_SYSTEM_COMPLETE=0
ARG PYTHON_TMPDIR=/tmp/android
COPY validate-android-args.sh /
RUN /validate-android-args.sh arm
COPY android-ndk.sh /
RUN /android-ndk.sh arm
ENV PATH=$PATH:/android-ndk/bin
COPY android-system.sh /
RUN mkdir -p $PYTHON_TMPDIR
COPY android $PYTHON_TMPDIR
RUN /android-system.sh arm
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-androideabi-
ENV CROSS_SYSROOT=/android-ndk/sysroot
ENV CROSS_ANDROID_SDK=$ANDROID_SDK
COPY android-symlink.sh /
RUN /android-symlink.sh arm arm-linux-androideabi
COPY android-runner /
COPY android.cmake /opt/toolchain.cmake
# Libz is distributed in the android ndk, but for some unknown reason it is not
# found in the build process of some crates, so we explicit set the DEP_Z_ROOT
ENV CROSS_TARGET_RUNNER="/android-runner arm"
ENV CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"ar \
AS_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"as \
CC_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
LD_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"ld \
NM_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"nm \
OBJCOPY_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"objcopy \
OBJDUMP_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"objdump \
RANLIB_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"ranlib \
READELF_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"readelf \
SIZE_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"size \
STRINGS_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"strings \
STRIP_armv7_linux_androideabi="$CROSS_TOOLCHAIN_PREFIX"strip \
CMAKE_TOOLCHAIN_FILE_armv7_linux_androideabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_armv7_linux_androideabi="--sysroot=$CROSS_SYSROOT" \
DEP_Z_INCLUDE="$CROSS_SYSROOT/usr/include/" \
RUST_TEST_THREADS=1 \
HOME=/tmp/ \
TMPDIR=/tmp/ \
ANDROID_DATA=/ \
ANDROID_DNS_MODE=local \
ANDROID_ROOT=/system \
CROSS_CMAKE_SYSTEM_NAME=Android \
CROSS_CMAKE_SYSTEM_PROCESSOR=armv7-a \
CROSS_CMAKE_CRT=android \
CROSS_CMAKE_OBJECT_FLAGS="--target=arm-linux-androideabi -DANDROID -ffunction-sections -fdata-sections -fPIC --target=armv7-linux-androideabi"
================================================
FILE: docker/Dockerfile.armv7-unknown-linux-gnueabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
RUN apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabi \
gfortran-arm-linux-gnueabi \
libc6-dev-armel-cross
COPY qemu.sh /
RUN /qemu.sh arm
COPY qemu-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-gnueabi-
ENV CROSS_SYSROOT=/usr/arm-linux-gnueabi
ENV CROSS_TARGET_RUNNER="/qemu-runner armv7"
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABI_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABI_RUNNER="$CROSS_TARGET_RUNNER" \
AR_armv7_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_armv7_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_armv7_unknown_linux_gnueabi="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_armv7_unknown_linux_gnueabi=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_gnueabi="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabi/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv7-a"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner
================================================
FILE: docker/Dockerfile.armv7-unknown-linux-gnueabihf
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-arm-linux-gnueabihf \
gfortran-arm-linux-gnueabihf \
libc6-dev-armhf-cross
COPY deny-debian-packages.sh /
RUN TARGET_ARCH=armhf /deny-debian-packages.sh \
binutils \
binutils-arm-linux-gnueabihf
COPY qemu.sh /
RUN /qemu.sh arm softmmu
COPY dropbear.sh /
RUN /dropbear.sh
COPY linux-image.sh /
RUN /linux-image.sh armv7
COPY linux-runner base-runner.sh /
COPY toolchain.cmake /opt/toolchain.cmake
ENV CROSS_TOOLCHAIN_PREFIX=arm-linux-gnueabihf-
ENV CROSS_SYSROOT=/usr/arm-linux-gnueabihf
ENV CROSS_TARGET_RUNNER="/linux-runner armv7hf"
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER="$CROSS_TARGET_RUNNER" \
AR_armv7_unknown_linux_gnueabihf="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_armv7_unknown_linux_gnueabihf="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_armv7_unknown_linux_gnueabihf="$CROSS_TOOLCHAIN_PREFIX"g++ \
CMAKE_TOOLCHAIN_FILE_armv7_unknown_linux_gnueabihf=/opt/toolchain.cmake \
BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_gnueabihf="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \
QEMU_LD_PREFIX="$CROSS_SYSROOT" \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig/:${PKG_CONFIG_PATH}" \
PKG_CONFIG_ALLOW_CROSS=1 \
CROSS_CMAKE_SYSTEM_NAME=Linux \
CROSS_CMAKE_SYSTEM_PROCESSOR=arm \
CROSS_CMAKE_CRT=gnu \
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC -march=armv7-a -mfpu=vfpv3-d16"
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /linux-runner
================================================
FILE: docker/Dockerfile.armv7-unknown-linux-musleabi
================================================
FROM ubuntu:20.04 AS cross-base
ENV DEBIAN_FRONTEND=noninteractive
COPY common.sh lib.sh /
RUN /common.sh
COPY cmake.sh /
RUN /cmake.sh
FROM cross-base AS build
COP
gitextract_3cdscn2l/
├── .cargo/
│ └── config.toml
├── .changes/
│ ├── 1006.json
│ ├── 1018.json
│ ├── 1023.json
│ ├── 1024.json
│ ├── 1028-1132.json
│ ├── 1032.json
│ ├── 1033.json
│ ├── 1038-1220-1482.json
│ ├── 1039.json
│ ├── 1049-1142.json
│ ├── 1054.json
│ ├── 1057.json
│ ├── 1063-1125-1134.json
│ ├── 1073.json
│ ├── 1078.json
│ ├── 1084.json
│ ├── 1085.json
│ ├── 1105.json
│ ├── 1112.json
│ ├── 1118.json
│ ├── 1123.json
│ ├── 1138.json
│ ├── 1159.json
│ ├── 1160.json
│ ├── 1164.json
│ ├── 1166.json
│ ├── 1183.json
│ ├── 1199.json
│ ├── 1207.json
│ ├── 1220.json
│ ├── 1246.json
│ ├── 1248.json
│ ├── 1260.json
│ ├── 1265.json
│ ├── 1271.json
│ ├── 1280.json
│ ├── 1317.json
│ ├── 1325.json
│ ├── 1330-1349.json
│ ├── 1333.json
│ ├── 1340.json
│ ├── 1342.json
│ ├── 1346.json
│ ├── 1348.json
│ ├── 1373.json
│ ├── 1374-1490.json
│ ├── 1385.json
│ ├── 1391.json
│ ├── 1399.json
│ ├── 1403-1411.json
│ ├── 1420.json
│ ├── 1458.json
│ ├── 1465.json
│ ├── 1466.json
│ ├── 1468.json
│ ├── 1481.json
│ ├── 1483.json
│ ├── 1485.json
│ ├── 1488.json
│ ├── 1489.json
│ ├── 1491.json
│ ├── 1494.json
│ ├── 1495.json
│ ├── 1525.json
│ ├── 1540.json
│ ├── 1557.json
│ ├── 1574.json
│ ├── 1623.json
│ ├── 1625.json
│ ├── 1630.json
│ ├── 1641.json
│ ├── 1647.json
│ ├── 1651.json
│ ├── 1664.json
│ ├── 1674.json
│ ├── 1681.json
│ ├── 554.json
│ ├── 589.json
│ ├── 591-1095.json
│ ├── 661.json
│ ├── 817.json
│ ├── 880-1111.json
│ ├── 918.json
│ ├── 931.json
│ ├── 934.json
│ ├── 937.json
│ ├── 939.json
│ ├── 942.json
│ ├── 945.json
│ ├── 947.json
│ ├── 952.json
│ ├── 955.json
│ ├── 956.json
│ ├── 957-1393.json
│ ├── 962.json
│ ├── 964.json
│ ├── 968.json
│ ├── 974.json
│ ├── 982.json
│ ├── 984.json
│ ├── 987.json
│ ├── 989.json
│ ├── 994.json
│ ├── README.md
│ └── template/
│ ├── 940.json
│ ├── 978.json
│ ├── 979-981.json
│ ├── CHANGELOG.md
│ └── issue440.json
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── CODEOWNERS
│ ├── ISSUE_TEMPLATE/
│ │ ├── a_blank_issue.md
│ │ ├── b_issue_report.yml
│ │ ├── config.yml
│ │ └── z_feature_request.yml
│ ├── actions/
│ │ ├── cargo-install-upload-artifacts/
│ │ │ └── action.yml
│ │ ├── cargo-llvm-cov/
│ │ │ └── action.yml
│ │ ├── cargo-publish/
│ │ │ └── action.yml
│ │ ├── post/
│ │ │ ├── action.yml
│ │ │ └── main.js
│ │ └── setup-rust/
│ │ ├── action.yml
│ │ └── rust.json
│ ├── bors.toml
│ ├── codecov.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── changelog.yml.x
│ ├── ci.yml
│ ├── try.yml
│ └── weekly.yml
├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── ci/
│ ├── build_release.sh
│ ├── shared.sh
│ ├── test-bisect.sh
│ ├── test-cross-image.sh
│ ├── test-docker-in-docker.sh
│ ├── test-foreign-toolchain.sh
│ ├── test-podman.sh
│ ├── test-remote.sh
│ ├── test-zig-image.sh
│ └── test.sh
├── clippy.toml
├── crosstool-ng/
│ ├── arm-unknown-linux-gnueabihf.config.in
│ ├── loongarch64-unknown-linux-gnu.config.in
│ └── loongarch64-unknown-linux-musl.config.in
├── deny.toml
├── docker/
│ ├── .dockerignore
│ ├── .gitattributes
│ ├── Dockerfile.aarch64-linux-android
│ ├── Dockerfile.aarch64-unknown-freebsd
│ ├── Dockerfile.aarch64-unknown-linux-gnu
│ ├── Dockerfile.aarch64-unknown-linux-gnu.centos
│ ├── Dockerfile.aarch64-unknown-linux-musl
│ ├── Dockerfile.aarch64_be-unknown-linux-gnu
│ ├── Dockerfile.arm-linux-androideabi
│ ├── Dockerfile.arm-unknown-linux-gnueabi
│ ├── Dockerfile.arm-unknown-linux-gnueabihf
│ ├── Dockerfile.arm-unknown-linux-musleabi
│ ├── Dockerfile.arm-unknown-linux-musleabihf
│ ├── Dockerfile.armv5te-unknown-linux-gnueabi
│ ├── Dockerfile.armv5te-unknown-linux-musleabi
│ ├── Dockerfile.armv7-linux-androideabi
│ ├── Dockerfile.armv7-unknown-linux-gnueabi
│ ├── Dockerfile.armv7-unknown-linux-gnueabihf
│ ├── Dockerfile.armv7-unknown-linux-musleabi
│ ├── Dockerfile.armv7-unknown-linux-musleabihf
│ ├── Dockerfile.asmjs-unknown-emscripten
│ ├── Dockerfile.cross
│ ├── Dockerfile.i586-unknown-linux-gnu
│ ├── Dockerfile.i586-unknown-linux-musl
│ ├── Dockerfile.i686-linux-android
│ ├── Dockerfile.i686-pc-windows-gnu
│ ├── Dockerfile.i686-unknown-freebsd
│ ├── Dockerfile.i686-unknown-linux-gnu
│ ├── Dockerfile.i686-unknown-linux-musl
│ ├── Dockerfile.loongarch64-unknown-linux-gnu
│ ├── Dockerfile.loongarch64-unknown-linux-musl
│ ├── Dockerfile.mips-unknown-linux-gnu
│ ├── Dockerfile.mips-unknown-linux-musl
│ ├── Dockerfile.mips64-unknown-linux-gnuabi64
│ ├── Dockerfile.mips64-unknown-linux-muslabi64
│ ├── Dockerfile.mips64el-unknown-linux-gnuabi64
│ ├── Dockerfile.mips64el-unknown-linux-muslabi64
│ ├── Dockerfile.mipsel-unknown-linux-gnu
│ ├── Dockerfile.mipsel-unknown-linux-musl
│ ├── Dockerfile.native
│ ├── Dockerfile.native.centos
│ ├── Dockerfile.powerpc-unknown-linux-gnu
│ ├── Dockerfile.powerpc64-unknown-linux-gnu
│ ├── Dockerfile.powerpc64le-unknown-linux-gnu
│ ├── Dockerfile.riscv64gc-unknown-linux-gnu
│ ├── Dockerfile.riscv64gc-unknown-linux-musl
│ ├── Dockerfile.s390x-unknown-linux-gnu
│ ├── Dockerfile.sparc64-unknown-linux-gnu
│ ├── Dockerfile.sparcv9-sun-solaris
│ ├── Dockerfile.thumbv6m-none-eabi
│ ├── Dockerfile.thumbv7em-none-eabi
│ ├── Dockerfile.thumbv7em-none-eabihf
│ ├── Dockerfile.thumbv7m-none-eabi
│ ├── Dockerfile.thumbv7neon-linux-androideabi
│ ├── Dockerfile.thumbv7neon-unknown-linux-gnueabihf
│ ├── Dockerfile.thumbv8m.base-none-eabi
│ ├── Dockerfile.thumbv8m.main-none-eabi
│ ├── Dockerfile.thumbv8m.main-none-eabihf
│ ├── Dockerfile.wasm32-unknown-emscripten
│ ├── Dockerfile.x86_64-linux-android
│ ├── Dockerfile.x86_64-pc-solaris
│ ├── Dockerfile.x86_64-pc-windows-gnu
│ ├── Dockerfile.x86_64-unknown-dragonfly
│ ├── Dockerfile.x86_64-unknown-freebsd
│ ├── Dockerfile.x86_64-unknown-illumos
│ ├── Dockerfile.x86_64-unknown-linux-gnu
│ ├── Dockerfile.x86_64-unknown-linux-gnu.centos
│ ├── Dockerfile.x86_64-unknown-linux-musl
│ ├── Dockerfile.x86_64-unknown-netbsd
│ ├── Dockerfile.zig
│ ├── aarch64-linux-gnu-glibc.sh
│ ├── android/
│ │ ├── README.md
│ │ ├── android/
│ │ │ ├── __init__.py
│ │ │ ├── make.py
│ │ │ ├── soong.py
│ │ │ └── util.py
│ │ ├── pyproject.toml
│ │ ├── scripts/
│ │ │ └── build-system.py
│ │ ├── tests/
│ │ │ ├── Addition.bp
│ │ │ ├── Android.bp
│ │ │ ├── Android.mk
│ │ │ ├── Comments.mk
│ │ │ ├── Empty.bp
│ │ │ ├── Empty.mk
│ │ │ ├── FakeTitle.mk
│ │ │ ├── Grouped.mk
│ │ │ ├── ListMap.bp
│ │ │ ├── Multiline.mk
│ │ │ ├── Nested.mk
│ │ │ ├── NonTest.bp
│ │ │ ├── README.md
│ │ │ ├── Single.mk
│ │ │ ├── test_make.py
│ │ │ ├── test_metadata.py
│ │ │ ├── test_soong.py
│ │ │ └── test_util.py
│ │ └── tox.ini
│ ├── android-ndk.sh
│ ├── android-runner
│ ├── android-symlink.sh
│ ├── android-system.sh
│ ├── android.cmake
│ ├── apt-cross-essential.sh
│ ├── base-runner.sh
│ ├── cmake.sh
│ ├── common.sh
│ ├── cross.sh
│ ├── crosstool-config/
│ │ ├── aarch64_be-unknown-linux-gnu.config
│ │ ├── arm-unknown-linux-gnueabihf.config
│ │ ├── loongarch64-unknown-linux-gnu.config
│ │ ├── loongarch64-unknown-linux-musl.config
│ │ └── riscv64gc-unknown-linux-musl.config
│ ├── crosstool-ng.sh
│ ├── deny-debian-packages.sh
│ ├── dragonfly.sh
│ ├── dropbear.sh
│ ├── emscripten.sh
│ ├── freebsd-common.sh
│ ├── freebsd-extras.sh
│ ├── freebsd-fetch-best-mirror.sh
│ ├── freebsd-gcc.sh
│ ├── freebsd-install-package.sh
│ ├── freebsd-install.sh
│ ├── freebsd-setup-packagesite.sh
│ ├── freebsd.sh
│ ├── illumos.sh
│ ├── lib.sh
│ ├── linux-image.sh
│ ├── linux-runner
│ ├── mingw.sh
│ ├── musl-gcc.sh
│ ├── musl-symlink.sh
│ ├── musl.sh
│ ├── native-linux-image.sh
│ ├── native-linux-runner
│ ├── native-qemu.sh
│ ├── netbsd.sh
│ ├── qemu-runner
│ ├── qemu.sh
│ ├── solaris.sh
│ ├── tidyup.sh
│ ├── toolchain.cmake
│ ├── validate-android-args.sh
│ ├── windows-entry.sh
│ ├── wine.sh
│ └── zig.sh
├── docs/
│ ├── cargo_configuration.md
│ ├── config_file.md
│ ├── custom_images.md
│ ├── environment_variables.md
│ ├── getting-started.md
│ ├── recipes.md
│ ├── remote.md
│ └── unstable_features.md
├── rustfmt.yml
├── src/
│ ├── bin/
│ │ ├── commands/
│ │ │ ├── clean.rs
│ │ │ ├── containers.rs
│ │ │ ├── images.rs
│ │ │ ├── mod.rs
│ │ │ └── run.rs
│ │ ├── cross-util.rs
│ │ └── cross.rs
│ ├── build.rs
│ ├── cargo.rs
│ ├── cli.rs
│ ├── config.rs
│ ├── cross_toml.rs
│ ├── docker/
│ │ ├── build.rs
│ │ ├── custom.rs
│ │ ├── engine.rs
│ │ ├── image.rs
│ │ ├── local.rs
│ │ ├── mod.rs
│ │ ├── provided_images.rs
│ │ ├── remote.rs
│ │ ├── seccomp.json
│ │ └── shared.rs
│ ├── errors.rs
│ ├── extensions.rs
│ ├── file.rs
│ ├── id.rs
│ ├── interpreter.rs
│ ├── lib.rs
│ ├── rustc.rs
│ ├── rustup.rs
│ ├── shell.rs
│ ├── temp.rs
│ ├── tests/
│ │ ├── rustup.rs
│ │ └── toml.rs
│ └── tests.rs
├── targets.toml
└── xtask/
├── Cargo.toml
└── src/
├── build_docker_image.rs
├── changelog.rs
├── ci/
│ └── target_matrix.rs
├── ci.rs
├── codegen.rs
├── crosstool.rs
├── hooks.rs
├── install_git_hooks.rs
├── main.rs
├── pre-commit.sh
├── pre-push.sh
├── target_info.rs
├── target_info.sh
└── util.rs
SYMBOL INDEX (1228 symbols across 52 files)
FILE: .github/actions/post/main.js
function run (line 4) | function run(cmd) {
FILE: docker/android/android/make.py
function loads (line 76) | def loads(contents, *_, **__):
function load (line 80) | def load(fp, *_, **__):
function dumps (line 84) | def dumps(makefile, *_, **__):
function dump (line 88) | def dump(makefile, fp, *_, **__):
class Makefile (line 92) | class Makefile(list):
method loads (line 94) | def loads(contents, *_, **__):
method load (line 102) | def load(fp, *_, **__):
method dumps (line 105) | def dumps(self, *_, **__):
method dump (line 108) | def dump(self, fp, *_, **__):
method filter (line 111) | def filter(self, op):
method recurse (line 114) | def recurse(self, max_depth=-1, depth=0):
method __repr__ (line 117) | def __repr__(self):
method __str__ (line 120) | def __str__(self):
class Node (line 124) | class Node:
method is_block (line 125) | def is_block(self):
method is_block_list (line 128) | def is_block_list(self):
method is_comment (line 131) | def is_comment(self):
method is_directive (line 134) | def is_directive(self):
method is_test (line 137) | def is_test(self):
method is_benchmark (line 140) | def is_benchmark(self):
method is_dev (line 143) | def is_dev(self):
method has_block_list (line 146) | def has_block_list(self):
method filter (line 149) | def filter(self, op):
method recurse (line 152) | def recurse(self, max_depth=-1, depth=0):
class Block (line 156) | class Block(str, Node):
method child (line 158) | def child(self):
method __repr__ (line 161) | def __repr__(self):
method __str__ (line 164) | def __str__(self):
method is_block (line 167) | def is_block(self):
method split_comments (line 170) | def split_comments(self):
method group_comments (line 173) | def group_comments(self):
method filter (line 176) | def filter(self, op):
class BlockList (line 180) | class BlockList(list, Node):
method __init__ (line 181) | def __init__(self, *args, **kwds):
method child (line 186) | def child(self):
method __repr__ (line 189) | def __repr__(self):
method __str__ (line 192) | def __str__(self):
method is_block_list (line 195) | def is_block_list(self):
method split_comments (line 198) | def split_comments(self):
method group_comments (line 201) | def group_comments(self):
method filter (line 204) | def filter(self, op):
method recurse (line 207) | def recurse(self, max_depth=-1, depth=0):
class CommentBlock (line 211) | class CommentBlock(Node):
method __init__ (line 213) | def __init__(self, comment, title, child):
method __eq__ (line 220) | def __eq__(self, other):
method __repr__ (line 223) | def __repr__(self):
method __str__ (line 226) | def __str__(self):
method is_comment (line 229) | def is_comment(self):
method is_test (line 232) | def is_test(self):
method is_benchmark (line 235) | def is_benchmark(self):
method has_block_list (line 238) | def has_block_list(self):
method split_comments (line 241) | def split_comments(self):
method group_comments (line 244) | def group_comments(self):
method flatten_single (line 247) | def flatten_single(self):
method filter (line 251) | def filter(self, op):
class DirectiveBlock (line 255) | class DirectiveBlock(Node):
method __init__ (line 257) | def __init__(self, start, end, child):
method __eq__ (line 266) | def __eq__(self, other):
method __repr__ (line 269) | def __repr__(self):
method __str__ (line 272) | def __str__(self):
method is_directive (line 278) | def is_directive(self):
method has_block_list (line 281) | def has_block_list(self):
method split_comments (line 284) | def split_comments(self):
method group_comments (line 289) | def group_comments(self):
method flatten_single (line 293) | def flatten_single(self):
method filter (line 297) | def filter(self, op):
function _split_comments (line 311) | def _split_comments(contents):
function _split_directives (line 398) | def _split_directives(lines, in_scope=False):
function _group_comments (line 454) | def _group_comments(blocks):
function _filter_list (line 501) | def _filter_list(lst, op):
function _recurse_list (line 508) | def _recurse_list(lst, max_depth=-1, depth=0):
FILE: docker/android/android/soong.py
function loads (line 81) | def loads(contents, *_, **__):
function load (line 85) | def load(fp, *_, **__):
function dumps (line 89) | def dumps(soong, pretty=True, indent=4, *_, **__):
function dump (line 93) | def dump(soong, fp, pretty=True, indent=4, *_, **__):
class Lexer (line 97) | class Lexer(sly.Lexer):
method newline (line 131) | def newline(self, token):
method error (line 134) | def error(self, token):
class Parser (line 138) | class Parser(sly.Parser):
method ast (line 146) | def ast(self, prod):
method ast (line 150) | def ast(self, prod):
method rules (line 154) | def rules(self, prod):
method rules (line 158) | def rules(self, prod):
method rule (line 162) | def rule(self, prod):
method assignment (line 166) | def assignment(self, prod):
method binary_operator_assignment (line 170) | def binary_operator_assignment(self, prod):
method binary_operator (line 178) | def binary_operator(self, prod):
method scope (line 182) | def scope(self, prod):
method map (line 186) | def map(self, prod):
method map (line 190) | def map(self, prod):
method pairs (line 194) | def pairs(self, prod):
method pairs (line 198) | def pairs(self, prod):
method pair (line 202) | def pair(self, prod):
method expr (line 206) | def expr(self, prod):
method list (line 210) | def list(self, prod):
method list (line 214) | def list(self, prod):
method sequence (line 218) | def sequence(self, prod):
method sequence (line 222) | def sequence(self, prod):
method list_item (line 226) | def list_item(self, prod):
method list_item (line 230) | def list_item(self, prod):
method ident (line 234) | def ident(self, prod):
method string (line 238) | def string(self, prod):
method integer (line 242) | def integer(self, prod):
method bool (line 246) | def bool(self, prod):
method empty (line 251) | def empty(self, p):
method error (line 254) | def error(self, token):
class Node (line 258) | class Node:
method is_assignment (line 259) | def is_assignment(self):
method is_binary_operator_assignment (line 262) | def is_binary_operator_assignment(self):
method is_binary_operator (line 265) | def is_binary_operator(self):
method is_scope (line 268) | def is_scope(self):
method is_map (line 271) | def is_map(self):
method is_list (line 274) | def is_list(self):
method is_map_value (line 277) | def is_map_value(self):
method is_ident (line 280) | def is_ident(self):
method is_string (line 283) | def is_string(self):
method is_integer (line 286) | def is_integer(self):
method is_bool (line 289) | def is_bool(self):
class Ast (line 293) | class Ast(list, Node):
method __init__ (line 294) | def __init__(self, values=None):
method __repr__ (line 301) | def __repr__(self):
method __str__ (line 304) | def __str__(self):
method to_str (line 307) | def to_str(self, pretty=True, indent=4, depth=0):
method loads (line 312) | def loads(contents, *_, **__):
method load (line 319) | def load(fp, *_, **__):
method dumps (line 322) | def dumps(self, pretty=True, indent=4, *_, **__):
method dump (line 325) | def dump(self, fp, pretty=True, indent=4, *_, **__):
method filter (line 329) | def filter(self, op):
class Assignment (line 334) | class Assignment(Node):
method __init__ (line 335) | def __init__(self, name, expr):
method __repr__ (line 339) | def __repr__(self):
method __str__ (line 342) | def __str__(self):
method to_str (line 345) | def to_str(self, pretty=True, indent=4, depth=0):
method is_assignment (line 348) | def is_assignment(self):
method __eq__ (line 351) | def __eq__(self, other):
class BinaryOperatorAssignment (line 355) | class BinaryOperatorAssignment(Node):
method __init__ (line 356) | def __init__(self, name, op, expr):
method __repr__ (line 361) | def __repr__(self):
method __str__ (line 364) | def __str__(self):
method to_str (line 367) | def to_str(self, pretty=True, indent=4, depth=0):
method is_binary_operator_assignment (line 371) | def is_binary_operator_assignment(self):
method __eq__ (line 374) | def __eq__(self, other):
class BinaryOperator (line 378) | class BinaryOperator(Node):
method __init__ (line 379) | def __init__(self, lhs, op, rhs):
method __repr__ (line 384) | def __repr__(self):
method __str__ (line 387) | def __str__(self):
method to_str (line 390) | def to_str(self, pretty=True, indent=4, depth=0):
method is_binary_operator (line 395) | def is_binary_operator(self):
method str_op (line 398) | def str_op(self, cmp):
method __eq__ (line 404) | def __eq__(self, other):
class Scope (line 408) | class Scope(Node):
method __init__ (line 409) | def __init__(self, name, map):
method __repr__ (line 413) | def __repr__(self):
method __str__ (line 416) | def __str__(self):
method to_str (line 419) | def to_str(self, pretty=True, indent=4, depth=0):
method is_scope (line 422) | def is_scope(self):
method __eq__ (line 425) | def __eq__(self, other):
method is_art_check (line 428) | def is_art_check(self):
method is_test (line 431) | def is_test(self):
method is_benchmark (line 434) | def is_benchmark(self):
method is_dev (line 437) | def is_dev(self):
class Map (line 441) | class Map(dict, Node):
method __repr__ (line 442) | def __repr__(self):
method __str__ (line 445) | def __str__(self):
method to_str (line 448) | def to_str(self, pretty=True, indent=4, depth=0):
method is_map (line 464) | def is_map(self):
method is_art_check (line 467) | def is_art_check(self):
method is_test (line 473) | def is_test(self):
method is_benchmark (line 482) | def is_benchmark(self):
method is_dev (line 488) | def is_dev(self):
method filter (line 491) | def filter(self, op):
method recurse (line 496) | def recurse(self, max_depth=-1, depth=0):
class List (line 505) | class List(list, Node):
method __repr__ (line 506) | def __repr__(self):
method __str__ (line 509) | def __str__(self):
method to_str (line 512) | def to_str(self, pretty=True, indent=4, depth=0):
method is_list (line 528) | def is_list(self):
method filter (line 531) | def filter(self, op):
class MapValue (line 536) | class MapValue(Node):
method __init__ (line 537) | def __init__(self, delimiter, value):
method __repr__ (line 543) | def __repr__(self):
method __str__ (line 546) | def __str__(self):
method __eq__ (line 549) | def __eq__(self, other):
method __len__ (line 555) | def __len__(self):
method to_str (line 558) | def to_str(self, pretty=True, indent=4, depth=0):
method str_op (line 564) | def str_op(self, cmp):
method is_map_value (line 567) | def is_map_value(self):
method filter (line 570) | def filter(self, op):
class Ident (line 574) | class Ident(str, Node):
method __repr__ (line 575) | def __repr__(self):
method __str__ (line 578) | def __str__(self):
method to_str (line 581) | def to_str(self, *_, **__):
method is_ident (line 584) | def is_ident(self):
class String (line 588) | class String(str, Node):
method __repr__ (line 589) | def __repr__(self):
method to_str (line 592) | def to_str(self, *_, **__):
method str_op (line 595) | def str_op(self, cmp):
method __str__ (line 598) | def __str__(self):
method __eq__ (line 602) | def __eq__(self, other):
method __ne__ (line 608) | def __ne__(self, other):
method is_string (line 612) | def is_string(self):
class Integer (line 616) | class Integer(int, Node):
method __repr__ (line 617) | def __repr__(self):
method __str__ (line 620) | def __str__(self):
method to_str (line 623) | def to_str(self, *_, **__):
method is_integer (line 626) | def is_integer(self):
class Bool (line 630) | class Bool(Node):
method __init__ (line 631) | def __init__(self, value=False):
method __bool__ (line 634) | def __bool__(self):
method __repr__ (line 637) | def __repr__(self):
method __str__ (line 640) | def __str__(self):
method to_str (line 643) | def to_str(self, *_, **__):
method is_bool (line 646) | def is_bool(self):
method __eq__ (line 649) | def __eq__(self, other):
function _indent (line 653) | def _indent(indent=4, depth=0, char=' '):
FILE: docker/android/android/util.py
function windows (line 4) | def windows(sequence, count):
function flatten (line 9) | def flatten(lst):
function _is_match (line 13) | def _is_match(pattern, string):
function is_test (line 17) | def is_test(string):
function is_benchmark (line 26) | def is_benchmark(string):
FILE: docker/android/scripts/build-system.py
function print_verbose (line 28) | def print_verbose(message, verbose):
function backup (line 33) | def backup(src, args, *_):
function restore (line 39) | def restore(dst, args, *_):
function filter_map (line 46) | def filter_map(map, remove):
function filter_list (line 54) | def filter_list(lst, remove):
function item_op (line 59) | def item_op(item, remove):
function remove_soong_tests (line 69) | def remove_soong_tests(path, args, *_):
function remove_makefile_tests (line 103) | def remove_makefile_tests(path, args, *_):
function remove_tests (line 112) | def remove_tests(path, args, processor):
function stash (line 120) | def stash(root):
function main (line 127) | def main():
FILE: docker/android/tests/test_make.py
function test (line 12) | def test():
function test_nested (line 39) | def test_nested():
function test_comments (line 65) | def test_comments():
function test_grouped (line 76) | def test_grouped():
function test_recurse (line 106) | def test_recurse():
function test_multiline (line 127) | def test_multiline():
function test_fake_title (line 144) | def test_fake_title():
function test_filter (line 157) | def test_filter():
function test_split_directives (line 181) | def test_split_directives():
function test_split_comments (line 224) | def test_split_comments():
function test_block (line 266) | def test_block():
function test_block_list (line 279) | def test_block_list():
function test_comment_block (line 292) | def test_comment_block():
function test_directive_block (line 324) | def test_directive_block():
FILE: docker/android/tests/test_metadata.py
function test_metadata (line 14) | def test_metadata():
FILE: docker/android/tests/test_soong.py
function test (line 12) | def test():
function test_addition (line 79) | def test_addition():
function test_empty (line 151) | def test_empty():
function test_list_map_parse (line 157) | def test_list_map_parse():
function test_is_non_test (line 177) | def test_is_non_test():
function test_ast (line 188) | def test_ast():
function test_assignment (line 208) | def test_assignment():
function test_binary_operator_assignment (line 224) | def test_binary_operator_assignment():
function test_binary_operator (line 234) | def test_binary_operator():
function test_scope (line 244) | def test_scope():
function test_map (line 259) | def test_map():
function test_recurse (line 277) | def test_recurse():
function test_list (line 294) | def test_list():
function test_map_value (line 317) | def test_map_value():
function test_list_map (line 329) | def test_list_map():
function test_ident (line 341) | def test_ident():
function test_string (line 348) | def test_string():
function test_integer (line 355) | def test_integer():
function test_bool (line 362) | def test_bool():
FILE: docker/android/tests/test_util.py
function test_is_test (line 11) | def test_is_test():
function test_is_benchmark (line 19) | def test_is_benchmark():
FILE: src/bin/commands/clean.rs
type Clean (line 9) | pub struct Clean {
method run (line 25) | pub fn run(
method engine (line 76) | pub fn engine(&self) -> Option<&str> {
FILE: src/bin/commands/containers.rs
type ListVolumes (line 11) | pub struct ListVolumes {
method run (line 18) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type RemoveAllVolumes (line 24) | pub struct RemoveAllVolumes {
method run (line 37) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type PruneVolumes (line 43) | pub struct PruneVolumes {
method run (line 53) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type CreateVolume (line 59) | pub struct CreateVolume {
method run (line 75) | pub fn run(
type RemoveVolume (line 86) | pub struct RemoveVolume {
method run (line 102) | pub fn run(
type Volumes (line 113) | pub enum Volumes {
method run (line 126) | pub fn run(
method engine (line 141) | pub fn engine(&self) -> Option<&str> {
method docker_in_docker (line 152) | pub fn docker_in_docker(&self) -> bool {
type ListContainers (line 164) | pub struct ListContainers {
method run (line 171) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type RemoveAllContainers (line 177) | pub struct RemoveAllContainers {
method run (line 190) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type Containers (line 196) | pub enum Containers {
method run (line 204) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
method engine (line 211) | pub fn engine(&self) -> Option<&str> {
function get_cross_volumes (line 219) | fn get_cross_volumes(
function list_volumes (line 238) | pub fn list_volumes(engine: &docker::Engine, msg_info: &mut MessageInfo)...
function remove_all_volumes (line 246) | pub fn remove_all_volumes(
function prune_volumes (line 270) | pub fn prune_volumes(
function create_persistent_volume (line 286) | pub fn create_persistent_volume(
function remove_persistent_volume (line 358) | pub fn remove_persistent_volume(
function get_cross_containers (line 382) | fn get_cross_containers(
function list_containers (line 401) | pub fn list_containers(engine: &docker::Engine, msg_info: &mut MessageIn...
function remove_all_containers (line 409) | pub fn remove_all_containers(
function toolchain_or_target (line 459) | fn toolchain_or_target(
FILE: src/bin/commands/images.rs
constant GHCR_IO (line 12) | const GHCR_IO: &str = docker::CROSS_IMAGE;
constant RUST_EMBEDDED (line 13) | const RUST_EMBEDDED: &str = "rustembedded/cross";
constant DOCKER_IO (line 14) | const DOCKER_IO: &str = "docker.io/rustembedded/cross";
constant IMAGE_PREFIXES (line 15) | const IMAGE_PREFIXES: &[&str] = &[GHCR_IO, DOCKER_IO, RUST_EMBEDDED];
type ListImages (line 18) | pub struct ListImages {
method run (line 30) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type OutputFormat (line 36) | pub enum OutputFormat {
method value_variants (line 42) | fn value_variants<'a>() -> &'a [Self] {
method to_possible_value (line 46) | fn to_possible_value(&self) -> Option<PossibleValue> {
type RemoveImages (line 55) | pub struct RemoveImages {
method run (line 73) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
type Images (line 83) | pub enum Images {
method run (line 91) | pub fn run(&self, engine: docker::Engine, msg_info: &mut MessageInfo) ...
method engine (line 98) | pub fn engine(&self) -> Option<&str> {
type Image (line 107) | struct Image {
method fmt (line 115) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method name (line 125) | fn name(&self) -> String {
function parse_image (line 130) | fn parse_image(image: &str) -> Image {
function is_cross_image (line 141) | fn is_cross_image(repository: &str) -> bool {
function is_local_image (line 145) | fn is_local_image(tag: &str) -> bool {
function get_cross_images (line 149) | fn get_cross_images(
function rustembedded_target (line 189) | fn rustembedded_target(tag: &str) -> String {
function get_image_target (line 203) | fn get_image_target(
function list_images (line 245) | pub fn list_images(
function remove_images (line 327) | fn remove_images(
function remove_all_images (line 350) | pub fn remove_all_images(
function remove_target_images (line 364) | pub fn remove_target_images(
function parse_rustembedded_target (line 392) | fn parse_rustembedded_target() {
FILE: src/bin/commands/run.rs
type Run (line 11) | pub struct Run {
method run (line 27) | pub fn run(
method engine (line 102) | pub fn engine(&self) -> Option<&str> {
FILE: src/bin/cross-util.rs
constant APP_NAME (line 9) | const APP_NAME: &str = "cross-util";
type Cli (line 14) | pub struct Cli {
type CliHidden (line 33) | struct CliHidden {
type Commands (line 39) | enum Commands {
function is_toolchain (line 55) | fn is_toolchain(toolchain: &str) -> cross::Result<Toolchain> {
function get_container_engine (line 64) | fn get_container_engine(
function main (line 87) | pub fn main() -> cross::Result<()> {
FILE: src/bin/cross.rs
function main (line 14) | pub fn main() -> cross::Result<()> {
FILE: src/build.rs
type Some (line 8) | struct Some {}
method from (line 14) | fn from(_: E) -> Some {
function main (line 19) | fn main() {
function commit_info (line 34) | fn commit_info() -> String {
function commit_hash (line 41) | fn commit_hash() -> Result<String, Some> {
function commit_date (line 53) | fn commit_date() -> Result<String, Some> {
FILE: src/cargo.rs
type Subcommand (line 11) | pub enum Subcommand {
method needs_docker (line 29) | pub fn needs_docker(self, is_remote: bool) -> bool {
method needs_host (line 38) | pub fn needs_host(self, is_remote: bool) -> bool {
method needs_interpreter (line 43) | pub fn needs_interpreter(self) -> bool {
method needs_target_in_command (line 48) | pub fn needs_target_in_command(self) -> bool {
method from (line 54) | fn from(s: &str) -> Subcommand {
type CargoMetadata (line 74) | pub struct CargoMetadata {
method non_workspace_members (line 83) | fn non_workspace_members(&self) -> impl Iterator<Item = &Package> {
method path_dependencies (line 89) | pub fn path_dependencies(&self) -> impl Iterator<Item = &Path> {
method get_package (line 96) | pub fn get_package(&self, package: &str) -> Option<&Package> {
type Package (line 102) | pub struct Package {
method crate_path (line 114) | fn crate_path(&self) -> Option<&Path> {
function cargo_command (line 125) | pub fn cargo_command() -> Command {
function cargo_metadata_with_args (line 130) | pub fn cargo_metadata_with_args(
function run (line 177) | pub fn run(args: &[String], msg_info: &mut MessageInfo) -> Result<ExitSt...
function run_and_get_output (line 184) | pub fn run_and_get_output(
FILE: src/cli.rs
type Args (line 12) | pub struct Args {
function is_subcommand_list (line 27) | pub fn is_subcommand_list(stdout: &str) -> bool {
function group_subcommands (line 31) | pub fn group_subcommands(stdout: &str) -> (Vec<&str>, Vec<&str>) {
function fmt_subcommands (line 48) | pub fn fmt_subcommands(stdout: &str, msg_info: &mut MessageInfo) -> Resu...
function is_verbose (line 65) | fn is_verbose(arg: &str) -> u8 {
type ArgKind (line 85) | enum ArgKind {
function is_value_arg (line 90) | fn is_value_arg(arg: &str, field: &str) -> Option<ArgKind> {
function parse_next_arg (line 104) | fn parse_next_arg<T>(
function parse_equal_arg (line 122) | fn parse_equal_arg<T>(
function parse_manifest_path (line 135) | fn parse_manifest_path(path: &str) -> Result<Option<PathBuf>> {
function parse_target_dir (line 140) | fn parse_target_dir(path: &str) -> Result<PathBuf> {
function identity (line 144) | fn identity(arg: String) -> Result<String> {
function str_to_owned (line 148) | fn str_to_owned(arg: &str) -> Result<String> {
function store_manifest_path (line 152) | fn store_manifest_path(path: String) -> Result<String> {
function store_target_dir (line 156) | fn store_target_dir(_: String) -> Result<String> {
function parse (line 160) | pub fn parse(target_list: &TargetList) -> Result<Args> {
function is_verbose_test (line 318) | fn is_verbose_test() {
FILE: src/config.rs
type ConfVal (line 13) | pub struct ConfVal<T> {
function new (line 19) | pub fn new(build: Option<T>, target: Option<T>) -> Self {
function map (line 23) | pub fn map<U, F: Fn(T) -> U>(self, f: F) -> ConfVal<U> {
method default (line 32) | fn default() -> Self {
function eq (line 38) | fn eq(&self, other: &(Option<T>, Option<T>)) -> bool {
type Environment (line 44) | pub(crate) struct Environment(&'static str, Option<HashMap<&'static str,...
method new (line 47) | pub(crate) fn new(map: Option<HashMap<&'static str, &'static str>>) ->...
method build_var_name (line 51) | fn build_var_name(&self, name: &str) -> String {
method get_var (line 55) | fn get_var(&self, name: &str) -> Option<String> {
method get_values_for (line 62) | fn get_values_for<T>(
method target_path (line 74) | fn target_path(target: &Target, key: &str) -> String {
method build_path (line 78) | fn build_path(key: &str) -> String {
method get_build_var (line 86) | fn get_build_var(&self, key: &str) -> Option<String> {
method get_target_var (line 90) | fn get_target_var(&self, target: &Target, key: &str) -> Option<String> {
method build_std (line 94) | fn build_std(&self, target: &Target) -> ConfVal<BuildStd> {
method zig (line 104) | fn zig(&self, target: &Target) -> ConfVal<bool> {
method zig_version (line 108) | fn zig_version(&self, target: &Target) -> ConfVal<String> {
method zig_image (line 112) | fn zig_image(&self, target: &Target) -> Result<ConfVal<PossibleImage>> {
method image (line 133) | fn image(&self, target: &Target) -> Result<Option<PossibleImage>> {
method dockerfile (line 138) | fn dockerfile(&self, target: &Target) -> ConfVal<String> {
method dockerfile_context (line 142) | fn dockerfile_context(&self, target: &Target) -> ConfVal<String> {
method pre_build (line 146) | fn pre_build(&self, target: &Target) -> ConfVal<PreBuild> {
method runner (line 160) | fn runner(&self, target: &Target) -> Option<String> {
method passthrough (line 164) | fn passthrough(&self, target: &Target) -> ConfVal<Vec<String>> {
method volumes (line 168) | fn volumes(&self, target: &Target) -> ConfVal<Vec<String>> {
method target (line 172) | fn target(&self) -> Option<String> {
method doctests (line 177) | fn doctests(&self) -> Option<bool> {
method custom_toolchain (line 182) | fn custom_toolchain(&self) -> bool {
method custom_toolchain_compat (line 187) | fn custom_toolchain_compat(&self) -> Option<String> {
method build_opts (line 191) | fn build_opts(&self) -> Option<String> {
function get_possible_image (line 196) | fn get_possible_image(
function split_to_cloned_by_ws (line 219) | fn split_to_cloned_by_ws(string: &str) -> Vec<String> {
function bool_from_envvar (line 225) | pub fn bool_from_envvar(envvar: &str) -> bool {
function try_bool_from_envvar (line 229) | pub fn try_bool_from_envvar(envvar: &str) -> Option<bool> {
type Config (line 240) | pub struct Config {
method new (line 246) | pub fn new(toml: Option<CrossToml>) -> Self {
method confusable_target (line 253) | pub fn confusable_target(&self, target: &Target, msg_info: &mut Messag...
method get_from_value_inner (line 270) | fn get_from_value_inner<T, U>(
method vec_from_config (line 301) | fn vec_from_config(
method get_from_ref (line 319) | fn get_from_ref<T, U>(
method get_from_value (line 333) | fn get_from_value<T>(
method new_with (line 348) | pub(crate) fn new_with(toml: Option<CrossToml>, env: Environment) -> S...
method build_std (line 352) | pub fn build_std(&self, target: &Target) -> Option<BuildStd> {
method zig (line 356) | pub fn zig(&self, target: &Target) -> Option<bool> {
method zig_version (line 360) | pub fn zig_version(&self, target: &Target) -> Option<String> {
method zig_image (line 364) | pub fn zig_image(&self, target: &Target) -> Result<Option<PossibleImag...
method image (line 369) | pub fn image(&self, target: &Target) -> Result<Option<PossibleImage>> {
method runner (line 378) | pub fn runner(&self, target: &Target) -> Option<String> {
method doctests (line 386) | pub fn doctests(&self) -> Option<bool> {
method custom_toolchain (line 390) | pub fn custom_toolchain(&self) -> bool {
method custom_toolchain_compat (line 394) | pub fn custom_toolchain_compat(&self) -> Option<String> {
method build_opts (line 398) | pub fn build_opts(&self) -> Option<String> {
method env_passthrough (line 402) | pub fn env_passthrough(&self, target: &Target) -> Option<Vec<String>> {
method env_volumes (line 411) | pub fn env_volumes(&self, target: &Target) -> Option<Vec<String>> {
method target (line 415) | pub fn target(&self, target_list: &TargetList) -> Option<Target> {
method dockerfile (line 424) | pub fn dockerfile(&self, target: &Target) -> Option<String> {
method dockerfile_context (line 428) | pub fn dockerfile_context(&self, target: &Target) -> Option<String> {
method dockerfile_build_args (line 436) | pub fn dockerfile_build_args(&self, target: &Target) -> Option<HashMap...
method pre_build (line 443) | pub fn pre_build(&self, target: &Target) -> Option<PreBuild> {
method sum_of_env_toml_values (line 448) | fn sum_of_env_toml_values<'a>(
function opt_merge (line 473) | pub fn opt_merge<I, T: Extend<I> + IntoIterator<Item = I>>(
function target_list (line 495) | fn target_list() -> TargetList {
function target (line 504) | fn target() -> Target {
function target2 (line 509) | fn target2() -> Target {
function parse_error_in_env (line 518) | pub fn parse_error_in_env() -> Result<()> {
function build_and_target_set_returns_tuple (line 536) | pub fn build_and_target_set_returns_tuple() -> Result<()> {
function target_build_var_name (line 549) | pub fn target_build_var_name() {
function collect_passthrough (line 560) | pub fn collect_passthrough() {
function toml (line 588) | fn toml(content: &str) -> Result<crate::CrossToml> {
function env_target_and_toml_build_pre_build_then_use_env (line 597) | pub fn env_target_and_toml_build_pre_build_then_use_env() -> Result<()> {
function env_target_then_toml_target_then_env_build_then_toml_build (line 618) | pub fn env_target_then_toml_target_then_env_build_then_toml_build() -> R...
function toml_build_passthrough_then_use_target_passthrough_both (line 641) | pub fn toml_build_passthrough_then_use_target_passthrough_both() -> Resu...
function toml_build_passthrough (line 658) | pub fn toml_build_passthrough() -> Result<()> {
function toml_target_passthrough (line 675) | pub fn toml_target_passthrough() -> Result<()> {
function volumes_use_env_over_toml (line 692) | pub fn volumes_use_env_over_toml() -> Result<()> {
function volumes_use_toml_when_no_env (line 709) | pub fn volumes_use_toml_when_no_env() -> Result<()> {
function no_env_and_no_toml_default_target_then_none (line 725) | pub fn no_env_and_no_toml_default_target_then_none() -> Result<()> {
function env_and_toml_default_target_then_use_env (line 734) | pub fn env_and_toml_default_target_then_use_env() -> Result<()> {
function no_env_but_toml_default_target_then_use_toml (line 747) | pub fn no_env_but_toml_default_target_then_use_toml() -> Result<()> {
FILE: src/cross_toml.rs
type CrossEnvConfig (line 21) | pub struct CrossEnvConfig {
type CrossBuildConfig (line 29) | pub struct CrossBuildConfig {
type CrossTargetConfig (line 45) | pub struct CrossTargetConfig {
type BuildStd (line 62) | pub enum BuildStd {
method enabled (line 74) | pub fn enabled(&self) -> bool {
method default (line 68) | fn default() -> Self {
type CrossTargetDockerfileConfig (line 85) | pub struct CrossTargetDockerfileConfig {
type Err (line 92) | type Err = std::convert::Infallible;
method from_str (line 94) | fn from_str(s: &str) -> Result<Self, Self::Err> {
type CrossZigConfig (line 106) | pub struct CrossZigConfig {
method from (line 114) | fn from(s: &str) -> CrossZigConfig {
method from (line 124) | fn from(s: bool) -> CrossZigConfig {
type Err (line 134) | type Err = std::convert::Infallible;
method from_str (line 136) | fn from_str(s: &str) -> Result<Self, Self::Err> {
type CrossToml (line 143) | pub struct CrossToml {
method parse_from_cross_str (line 152) | pub fn parse_from_cross_str(
method parse_from_cargo_package_str (line 162) | pub fn parse_from_cargo_package_str(
method parse_from_deserializer (line 184) | pub fn parse_from_deserializer<'de, D>(
method merge (line 210) | pub fn merge(self, other: CrossToml) -> Result<CrossToml> {
method image (line 276) | pub fn image(&self, target: &Target) -> Option<&PossibleImage> {
method dockerfile (line 281) | pub fn dockerfile(&self, target: &Target) -> ConfVal<&String> {
method dockerfile_context (line 290) | pub fn dockerfile_context(&self, target: &Target) -> ConfVal<&String> {
method dockerfile_build_args (line 299) | pub fn dockerfile_build_args(&self, target: &Target) -> Option<HashMap...
method pre_build (line 315) | pub fn pre_build(&self, target: &Target) -> ConfVal<&PreBuild> {
method runner (line 320) | pub fn runner(&self, target: &Target) -> Option<&String> {
method build_std (line 325) | pub fn build_std(&self, target: &Target) -> ConfVal<&BuildStd> {
method zig (line 330) | pub fn zig(&self, target: &Target) -> ConfVal<bool> {
method zig_version (line 339) | pub fn zig_version(&self, target: &Target) -> ConfVal<String> {
method zig_image (line 348) | pub fn zig_image(&self, target: &Target) -> ConfVal<PossibleImage> {
method env_passthrough (line 357) | pub fn env_passthrough(&self, target: &Target) -> ConfVal<&[String]> {
method env_volumes (line 366) | pub fn env_volumes(&self, target: &Target) -> ConfVal<&[String]> {
method default_target (line 375) | pub fn default_target(&self, target_list: &TargetList) -> Option<Targe...
method get_target (line 383) | fn get_target(&self, target: &Target) -> Option<&CrossTargetConfig> {
method get_value (line 387) | fn get_value<T>(
method get_ref (line 398) | fn get_ref<T: ?Sized>(
function opt_string_or_struct (line 410) | fn opt_string_or_struct<'de, T, D>(deserializer: D) -> Result<Option<T>,...
function opt_string_or_string_vec (line 465) | fn opt_string_or_string_vec<'de, T, D>(deserializer: D) -> Result<Option...
function opt_string_bool_or_struct (line 523) | fn opt_string_bool_or_struct<'de, T, D>(deserializer: D) -> Result<Optio...
function parse_empty_toml (line 605) | pub fn parse_empty_toml() -> Result<()> {
function parse_build_toml (line 619) | pub fn parse_build_toml() -> Result<()> {
function parse_target_toml (line 652) | pub fn parse_target_toml() -> Result<()> {
function parse_mixed_toml (line 721) | pub fn parse_mixed_toml() -> Result<()> {
function parse_from_empty_cargo_toml (line 803) | pub fn parse_from_empty_cargo_toml() -> Result<()> {
function parse_from_cargo_toml (line 820) | pub fn parse_from_cargo_toml() -> Result<()> {
function fully_populated_roundtrip (line 860) | pub fn fully_populated_roundtrip() -> Result<()> {
function merge (line 882) | pub fn merge() -> Result<()> {
function pre_build_script (line 1023) | fn pre_build_script() -> Result<()> {
FILE: src/docker/build.rs
type Progress (line 10) | pub enum Progress {
type Err (line 17) | type Err = eyre::ErrReport;
method from_str (line 19) | fn from_str(progress: &str) -> Result<Self> {
function from (line 30) | fn from(progress: Progress) -> Self {
type BuildCommandExt (line 39) | pub trait BuildCommandExt {
method invoke_build_command (line 40) | fn invoke_build_command(&mut self) -> &mut Self;
method progress (line 41) | fn progress(&mut self, progress: Option<Progress>) -> Result<&mut Self>;
method verbose (line 42) | fn verbose(&mut self, verbosity: Verbosity) -> &mut Self;
method disable_scan_suggest (line 43) | fn disable_scan_suggest(&mut self) -> &mut Self;
method cross_labels (line 44) | fn cross_labels(&mut self, target: &str, platform: &str) -> &mut Self;
method invoke_build_command (line 48) | fn invoke_build_command(&mut self) -> &mut Self {
method progress (line 55) | fn progress(&mut self, progress: Option<Progress>) -> Result<&mut Self> {
method verbose (line 66) | fn verbose(&mut self, verbosity: Verbosity) -> &mut Self {
method disable_scan_suggest (line 73) | fn disable_scan_suggest(&mut self) -> &mut Self {
method cross_labels (line 77) | fn cross_labels(&mut self, target: &str, platform: &str) -> &mut Self {
type BuildResultExt (line 89) | pub trait BuildResultExt {
method engine_warning (line 90) | fn engine_warning(self, engine: &Engine) -> Result<()>;
method buildkit_warning (line 91) | fn buildkit_warning(self) -> Result<()>;
method engine_warning (line 95) | fn engine_warning(self, engine: &Engine) -> Result<()> {
method buildkit_warning (line 108) | fn buildkit_warning(mut self) -> Result<()> {
FILE: src/docker/custom.rs
constant CROSS_CUSTOM_DOCKERFILE_IMAGE_PREFIX (line 15) | pub const CROSS_CUSTOM_DOCKERFILE_IMAGE_PREFIX: &str = "localhost/cross-...
type Dockerfile (line 18) | pub enum Dockerfile<'a> {
type PreBuild (line 32) | pub enum PreBuild {
method serialize (line 40) | fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::...
method from (line 66) | fn from(vec: Vec<String>) -> Self {
method is_single (line 73) | pub fn is_single(&self) -> bool {
method is_lines (line 78) | pub fn is_lines(&self) -> bool {
type Err (line 55) | type Err = std::convert::Infallible;
method from_str (line 57) | fn from_str(s: &str) -> Result<Self, Self::Err> {
function build (line 84) | pub fn build(
function image_name (line 182) | pub fn image_name(
function context (line 205) | fn context(&self) -> Option<&'a str> {
function runs_with (line 214) | fn runs_with(&self) -> &ImagePlatform {
function docker_package_name (line 222) | fn docker_package_name(metadata: &CargoMetadata) -> String {
function docker_tag_name (line 238) | fn docker_tag_name(file_name: &str) -> String {
function docker_tag_name_test (line 298) | fn docker_tag_name_test() {
FILE: src/docker/engine.rs
constant DOCKER (line 12) | pub const DOCKER: &str = "docker";
constant PODMAN (line 13) | pub const PODMAN: &str = "podman";
type EngineType (line 16) | pub enum EngineType {
method is_podman (line 27) | pub const fn is_podman(&self) -> bool {
method is_docker (line 33) | pub const fn is_docker(&self) -> bool {
method supports_output_flag (line 39) | pub const fn supports_output_flag(&self) -> bool {
method supports_pull_flag (line 45) | pub const fn supports_pull_flag(&self) -> bool {
method supports_cache_from_type (line 56) | pub const fn supports_cache_from_type(&self) -> bool {
type Engine (line 62) | pub struct Engine {
constant CROSS_CONTAINER_ENGINE_NO_BUILDKIT_ENV (line 73) | pub const CROSS_CONTAINER_ENGINE_NO_BUILDKIT_ENV: &'static str =
method new (line 75) | pub fn new(
method from_path (line 87) | pub fn from_path(
method needs_remote (line 112) | pub fn needs_remote(&self) -> bool {
method in_docker (line 116) | pub fn in_docker(msg_info: &mut MessageInfo) -> Result<bool> {
method is_remote (line 135) | pub fn is_remote() -> bool {
method has_buildkit (line 142) | pub fn has_buildkit() -> bool {
function is_rootless (line 149) | fn is_rootless(kind: EngineType) -> Option<bool> {
function is_docker_rootless (line 160) | fn is_docker_rootless(ce: &Path, msg_info: &mut MessageInfo) -> bool {
function various_is_rootless_configs (line 175) | fn various_is_rootless_configs() {
function get_engine_info (line 214) | fn get_engine_info(
type EngineInfoError (line 267) | pub enum EngineInfoError {
method to_section_report (line 275) | pub fn to_section_report(self) -> eyre::Report {
function engine_info (line 286) | fn engine_info(
function get_podman_info (line 309) | fn get_podman_info(
function get_custom_info (line 316) | fn get_custom_info(
function get_container_engine (line 328) | pub fn get_container_engine() -> Result<PathBuf, which::Error> {
FILE: src/docker/image.rs
type Image (line 15) | pub struct Image {
method fmt (line 22) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type PossibleImage (line 28) | pub struct PossibleImage {
method to_definite_with (line 36) | pub fn to_definite_with(&self, engine: &Engine, msg_info: &mut Message...
method from (line 93) | fn from(s: T) -> Self {
method fmt (line 110) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Err (line 102) | type Err = std::convert::Infallible;
method from_str (line 104) | fn from_str(s: &str) -> Result<Self, Self::Err> {
type ImageReference (line 117) | pub enum ImageReference {
method get (line 127) | pub fn get(&self) -> &str {
method ensure_qualified (line 135) | pub fn ensure_qualified(&mut self, target_name: &str) {
method from (line 151) | fn from(s: String) -> Self {
type ImagePlatform (line 167) | pub struct ImagePlatform {
constant DEFAULT (line 178) | pub const DEFAULT: Self = ImagePlatform::from_const_target(TargetTripl...
constant X86_64_UNKNOWN_LINUX_GNU (line 179) | pub const X86_64_UNKNOWN_LINUX_GNU: Self =
constant AARCH64_UNKNOWN_LINUX_GNU (line 181) | pub const AARCH64_UNKNOWN_LINUX_GNU: Self =
method docker_platform (line 187) | pub fn docker_platform(&self) -> String {
method to_codegen_string (line 196) | pub fn to_codegen_string(&self) -> Option<&'static str> {
type Error (line 214) | type Error = <Self as std::str::FromStr>::Err;
method try_from (line 216) | fn try_from(value: String) -> Result<Self, Self::Error> {
type Err (line 228) | type Err = eyre::Report;
method from_str (line 230) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method from_target (line 382) | pub fn from_target(target: TargetTriple) -> Result<Self> {
method from_const_target (line 406) | pub const fn from_const_target(target: TargetTriple) -> Self {
method specify_platform (line 456) | pub fn specify_platform(&self, engine: &Engine, cmd: &mut std::process...
method default (line 208) | fn default() -> ImagePlatform {
method serialize (line 222) | fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok...
type Architecture (line 273) | pub enum Architecture {
method from_target (line 297) | pub fn from_target(target: &TargetTriple) -> Result<Self> {
method new (line 306) | pub fn new(s: &str) -> Result<Self> {
method fmt (line 315) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Os (line 325) | pub enum Os {
method from_target (line 344) | pub fn from_target(target: &TargetTriple) -> Result<Self> {
method new (line 367) | pub fn new(s: &str) -> Result<Self> {
method fmt (line 376) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function architecture_from_target (line 484) | fn architecture_from_target() -> Result<()> {
function os_from_target (line 508) | fn os_from_target() -> Result<()> {
function image_platform_from_docker_platform_str (line 529) | fn image_platform_from_docker_platform_str() -> Result<()> {
FILE: src/docker/local.rs
function mount (line 15) | fn mount(
function run (line 30) | pub(crate) fn run(
FILE: src/docker/mod.rs
type ProvidedImage (line 25) | pub struct ProvidedImage {
method image_name (line 33) | pub fn image_name(&self, repository: &str, tag: &str) -> String {
method default_image_name (line 37) | pub fn default_image_name(&self) -> String {
function image_name (line 42) | pub fn image_name(target: &str, sub: Option<&str>, repository: &str, tag...
function run (line 53) | pub fn run(
FILE: src/docker/remote.rs
function subcommand_or_exit (line 34) | fn subcommand_or_exit(engine: &Engine, cmd: &str) -> Result<Command> {
function posix_parent (line 39) | pub fn posix_parent(path: &str) -> Option<&str> {
function create_dir (line 48) | fn create_dir(
function copy_files (line 70) | fn copy_files(
function copy_files_nocache (line 108) | fn copy_files_nocache(
function copy_file_list (line 129) | fn copy_file_list(
function remove_file_list (line 153) | fn remove_file_list(
function container_path_exists (line 194) | fn container_path_exists(
function copy_cargo (line 212) | pub fn copy_cargo(
function copy_rust_base (line 249) | fn copy_rust_base(&self, mount_prefix: &str, msg_info: &mut MessageInfo)...
function copy_rust_manifest (line 293) | fn copy_rust_manifest(&self, mount_prefix: &str, msg_info: &mut MessageI...
function copy_rust_triple (line 319) | fn copy_rust_triple(
function copy_rust (line 357) | pub fn copy_rust(
function copy_mount (line 378) | fn copy_mount(
function is_cachedir_tag (line 434) | fn is_cachedir_tag(path: &Path) -> Result<bool> {
function is_cachedir (line 442) | fn is_cachedir(entry: &fs::DirEntry) -> bool {
function copy_dir (line 454) | fn copy_dir<Skip>(
function warn_symlinks (line 512) | fn warn_symlinks(had_symlinks: bool, msg_info: &mut MessageInfo) -> Resu...
type Fingerprint (line 521) | struct Fingerprint {
method new (line 526) | fn new() -> Self {
method read_file (line 532) | fn read_file(path: &Path) -> Result<Self> {
method write_file (line 548) | fn write_file(&self, path: &Path) -> Result<()> {
method _read_dir (line 562) | fn _read_dir(&mut self, home: &Path, path: &Path, copy_cache: bool) ->...
method read_dir (line 584) | fn read_dir(home: &Path, copy_cache: bool) -> Result<Fingerprint> {
method difference (line 591) | fn difference<'a, 'b>(&'a self, current: &'b Fingerprint) -> (Vec<&'b ...
method unique_toolchain_identifier (line 609) | pub fn unique_toolchain_identifier(&self) -> Result<String> {
method unique_container_identifier (line 631) | pub fn unique_container_identifier(&self, triple: &TargetTriple) -> Resu...
method unique_mount_identifier (line 639) | pub fn unique_mount_identifier(&self, path: &Path) -> Result<String> {
function run (line 646) | pub(crate) fn run(
FILE: src/docker/shared.rs
constant CROSS_IMAGE (line 26) | pub const CROSS_IMAGE: &str = {
constant UBUNTU_BASE (line 35) | pub const UBUNTU_BASE: &str = "ubuntu:20.04";
constant DEFAULT_IMAGE_VERSION (line 36) | pub const DEFAULT_IMAGE_VERSION: &str = if crate::commit_info().is_empty...
type DockerOptions (line 43) | pub struct DockerOptions {
method new (line 55) | pub fn new(
method in_docker (line 76) | pub fn in_docker(&self) -> bool {
method is_remote (line 81) | pub fn is_remote(&self) -> bool {
method needs_custom_image (line 86) | pub fn needs_custom_image(&self) -> bool {
method custom_image_build (line 91) | pub(crate) fn custom_image_build(
type DockerPaths (line 201) | pub struct DockerPaths {
method create (line 209) | pub fn create(
method get_sysroot (line 227) | pub fn get_sysroot(&self) -> &Path {
method workspace_root (line 231) | pub fn workspace_root(&self) -> &Path {
method workspace_dependencies (line 235) | pub fn workspace_dependencies(&self) -> impl Iterator<Item = &Path> {
method workspace_from_cwd (line 239) | pub fn workspace_from_cwd(&self) -> Result<&Path> {
method in_workspace (line 246) | pub fn in_workspace(&self) -> bool {
method mount_cwd (line 250) | pub fn mount_cwd(&self) -> &str {
method host_root (line 254) | pub fn host_root(&self) -> &Path {
type ToolchainDirectories (line 260) | pub struct ToolchainDirectories {
method assemble (line 269) | pub fn assemble(mount_finder: &MountFinder, toolchain: QualifiedToolch...
method unique_toolchain_identifier (line 321) | pub fn unique_toolchain_identifier(&self) -> Result<String> {
method unique_container_identifier (line 325) | pub fn unique_container_identifier(&self, triple: &TargetTriple) -> Re...
method toolchain (line 329) | pub fn toolchain(&self) -> &QualifiedToolchain {
method get_sysroot (line 333) | pub fn get_sysroot(&self) -> &Path {
method host_target (line 337) | pub fn host_target(&self) -> &TargetTriple {
method cargo (line 341) | pub fn cargo(&self) -> &Path {
method cargo_host_path (line 345) | pub fn cargo_host_path(&self) -> Result<&str> {
method cargo_mount_path (line 349) | pub fn cargo_mount_path(&self) -> &str {
method sysroot_mount_path (line 353) | pub fn sysroot_mount_path(&self) -> &str {
method nix_store (line 357) | pub fn nix_store(&self) -> Option<&Path> {
method cargo_mount_path_relative (line 361) | pub fn cargo_mount_path_relative(&self) -> Result<String> {
method sysroot_mount_path_relative (line 368) | pub fn sysroot_mount_path_relative(&self) -> Result<String> {
type PackageDirectories (line 377) | pub struct PackageDirectories {
method assemble (line 386) | pub fn assemble(
method target (line 419) | pub fn target(&self) -> &Path {
method host_root (line 423) | pub fn host_root(&self) -> &Path {
method mount_root (line 427) | pub fn mount_root(&self) -> &str {
method mount_cwd (line 431) | pub fn mount_cwd(&self) -> &str {
type Directories (line 437) | pub struct Directories {
method assemble (line 443) | pub fn assemble(
method toolchain_directories (line 455) | pub fn toolchain_directories(&self) -> &ToolchainDirectories {
method package_directories (line 459) | pub fn package_directories(&self) -> &PackageDirectories {
type ContainerState (line 465) | pub enum ContainerState {
method new (line 476) | pub fn new(state: &str) -> Result<Self> {
method is_stopped (line 490) | pub fn is_stopped(&self) -> bool {
method exists (line 495) | pub fn exists(&self) -> bool {
constant MOUNT_PREFIX (line 501) | pub const MOUNT_PREFIX: &str = "/cross";
constant VOLUME_PREFIX (line 503) | pub const VOLUME_PREFIX: &str = "cross-";
constant DEFAULT_TIMEOUT (line 505) | pub const DEFAULT_TIMEOUT: u32 = 2;
constant NO_TIMEOUT (line 507) | pub const NO_TIMEOUT: u32 = 0;
type ChildContainerInfo (line 514) | pub(crate) struct ChildContainerInfo {
type ChildContainer (line 528) | pub struct ChildContainer {
method new (line 540) | pub const fn new() -> ChildContainer {
method create (line 547) | pub fn create(engine: Engine, name: String) -> Result<()> {
method exists (line 568) | pub fn exists(&self) -> bool {
method exists_static (line 572) | pub fn exists_static() -> bool {
method exit (line 579) | pub fn exit(&mut self) {
method exit_static (line 583) | pub fn exit_static() {
method finish (line 591) | pub fn finish(&mut self, is_tty: bool, msg_info: &mut MessageInfo) {
method finish_static (line 609) | pub fn finish_static(is_tty: bool, msg_info: &mut MessageInfo) {
method terminate (line 619) | pub fn terminate(&mut self) {
method default (line 534) | fn default() -> Self {
method drop (line 635) | fn drop(&mut self) {
type ContainerDataVolume (line 641) | pub struct ContainerDataVolume<'a, 'b, 'c> {
function new (line 648) | pub const fn new(
type VolumeId (line 662) | pub enum VolumeId {
method mount (line 668) | pub fn mount(&self, mount_prefix: &str) -> String {
type DockerVolume (line 677) | pub struct DockerVolume<'a, 'b> {
function new (line 683) | pub const fn new(engine: &'a Engine, name: &'b str) -> Self {
function create (line 688) | pub fn create(&self, msg_info: &mut MessageInfo) -> Result<ExitStatus> {
function remove (line 694) | pub fn remove(&self, msg_info: &mut MessageInfo) -> Result<ExitStatus> {
function exists (line 700) | pub fn exists(&self, msg_info: &mut MessageInfo) -> Result<bool> {
function existing (line 707) | pub fn existing(
type DockerContainer (line 735) | pub struct DockerContainer<'a, 'b> {
function new (line 741) | pub const fn new(engine: &'a Engine, name: &'b str) -> Self {
function stop (line 745) | pub fn stop(&self, timeout: u32, msg_info: &mut MessageInfo) -> Result<E...
function stop_default (line 752) | pub fn stop_default(&self, msg_info: &mut MessageInfo) -> Result<ExitSta...
function remove (line 763) | pub fn remove(&self, msg_info: &mut MessageInfo) -> Result<ExitStatus> {
function state (line 769) | pub fn state(&self, msg_info: &mut MessageInfo) -> Result<ContainerState> {
function time_to_millis (line 781) | pub(crate) fn time_to_millis(timestamp: &time::SystemTime) -> Result<u64> {
function time_from_millis (line 787) | pub(crate) fn time_from_millis(millis: u64) -> time::SystemTime {
function now_as_millis (line 791) | pub(crate) fn now_as_millis() -> Result<u64> {
constant CACHEDIR_TAG (line 795) | const CACHEDIR_TAG: &str = "Signature: 8a477f597d28d172789f06886806bc55
function create_target_dir (line 799) | pub fn create_target_dir(path: &Path) -> Result<()> {
method command (line 814) | pub fn command(&self) -> Command {
method subcommand (line 823) | pub fn subcommand(&self, cmd: &str) -> Command {
method run_and_get_status (line 830) | pub(crate) fn run_and_get_status(
method run_and_get_output (line 839) | pub(crate) fn run_and_get_output(
method parse_opts (line 847) | pub fn parse_opts(value: &str) -> Result<Vec<String>> {
method register_binfmt (line 853) | pub(crate) fn register_binfmt(
function validate_env_var (line 878) | fn validate_env_var<'a>(
method safe_command (line 912) | pub(crate) fn safe_command(&self) -> SafeCommand {
type DockerCommandExt (line 917) | pub(crate) trait DockerCommandExt {
method add_configuration_envvars (line 918) | fn add_configuration_envvars(&mut self);
method add_envvars (line 919) | fn add_envvars(
method add_cwd (line 925) | fn add_cwd(&mut self, paths: &DockerPaths) -> Result<()>;
method add_build_command (line 926) | fn add_build_command(&mut self, dirs: &ToolchainDirectories, cmd: &Saf...
method add_user_id (line 927) | fn add_user_id(&mut self, is_rootless: bool);
method add_userns (line 928) | fn add_userns(&mut self);
method add_seccomp (line 929) | fn add_seccomp(
method add_mounts (line 935) | fn add_mounts(
method add_configuration_envvars (line 946) | fn add_configuration_envvars(&mut self) {
method add_envvars (line 988) | fn add_envvars(
method add_cwd (line 1057) | fn add_cwd(&mut self, paths: &DockerPaths) -> Result<()> {
method add_build_command (line 1063) | fn add_build_command(&mut self, dirs: &ToolchainDirectories, cmd: &Saf...
method add_user_id (line 1072) | fn add_user_id(&mut self, is_rootless: bool) {
method add_userns (line 1081) | fn add_userns(&mut self) {
method add_seccomp (line 1093) | fn add_seccomp(
method add_mounts (line 1135) | fn add_mounts(
function user_id (line 1194) | pub(crate) fn user_id() -> String {
function group_id (line 1198) | pub(crate) fn group_id() -> String {
type GetImageError (line 1203) | pub enum GetImageError {
function get_target_name (line 1217) | fn get_target_name(target: &Target, uses_zig: bool) -> &str {
function get_user_image (line 1225) | fn get_user_image(
function get_provided_images_for_target (line 1245) | fn get_provided_images_for_target(
function get_image_name (line 1261) | pub fn get_image_name(
function get_image (line 1278) | pub fn get_image(
function docker_inspect_self_mountinfo (line 1333) | fn docker_inspect_self_mountinfo(engine: &Engine, msg_info: &mut Message...
function docker_inspect_self (line 1359) | fn docker_inspect_self(engine: &Engine, msg_info: &mut MessageInfo) -> R...
function docker_read_mount_paths (line 1398) | fn docker_read_mount_paths(
function dockerinfo_parse_mounts (line 1407) | fn dockerinfo_parse_mounts(info: &serde_json::Value) -> Result<Vec<Mount...
function dockerinfo_parse_root_mount_path (line 1414) | fn dockerinfo_parse_root_mount_path(info: &serde_json::Value) -> Result<...
function dockerinfo_parse_user_mounts (line 1435) | fn dockerinfo_parse_user_mounts(info: &serde_json::Value) -> Vec<MountDe...
type MountFinder (line 1456) | pub struct MountFinder {
method new (line 1467) | fn new(mounts: Vec<MountDetail>) -> MountFinder {
method create (line 1478) | pub fn create(engine: &Engine, msg_info: &mut MessageInfo) -> Result<M...
method find_mount_path (line 1486) | pub fn find_mount_path(&self, path: impl AsRef<Path>) -> PathBuf {
method find_path (line 1498) | fn find_path(&self, path: &Path, host: bool) -> Result<String> {
type MountDetail (line 1461) | struct MountDetail {
constant PATH_HASH_SHORT (line 1512) | pub const PATH_HASH_SHORT: usize = 5;
constant PATH_HASH_UNIQUE (line 1516) | pub const PATH_HASH_UNIQUE: usize = 10;
function path_digest (line 1518) | fn path_digest(path: &Path) -> Result<const_sha1::Digest> {
function path_hash (line 1522) | pub fn path_hash(path: &Path, count: usize) -> Result<String> {
function test_docker_user_id (line 1541) | fn test_docker_user_id() {
function test_docker_userns (line 1556) | fn test_docker_userns() {
function test_tag_only_image (line 1591) | fn test_tag_only_image() -> Result<()> {
function unset_env (line 1640) | fn unset_env() -> Vec<(&'static str, Option<String>)> {
function reset_env (line 1651) | fn reset_env(vars: Vec<(&'static str, Option<String>)>) {
function create_engine (line 1659) | fn create_engine(msg_info: &mut MessageInfo) -> Result<Engine> {
function cargo_metadata (line 1663) | fn cargo_metadata(subdir: bool, msg_info: &mut MessageInfo) -> Result<Ca...
function home (line 1685) | fn home() -> Result<PathBuf> {
function get_cwd (line 1689) | fn get_cwd() -> Result<PathBuf> {
function get_toolchain (line 1696) | fn get_toolchain() -> Result<QualifiedToolchain> {
function get_directories (line 1714) | fn get_directories(
function paths_equal (line 1724) | fn paths_equal(x: &Path, y: &Path) -> Result<()> {
function test_host (line 1731) | fn test_host() -> Result<()> {
function test_docker_in_docker (line 1752) | fn test_docker_in_docker() -> Result<()> {
function test_default_finder_returns_original (line 1797) | fn test_default_finder_returns_original() {
function test_longest_destination_path_wins (line 1806) | fn test_longest_destination_path_wins() {
function test_adjust_multiple_paths (line 1824) | fn test_adjust_multiple_paths() {
function test_parse_container_root (line 1855) | fn test_parse_container_root() {
function test_parse_empty_user_mounts (line 1875) | fn test_parse_empty_user_mounts() {
function test_parse_missing_user_moutns (line 1883) | fn test_parse_missing_user_moutns() {
FILE: src/errors.rs
function install_panic_hook (line 12) | pub fn install_panic_hook() -> Result<()> {
function termination_handler (line 22) | unsafe fn termination_handler() {
function install_termination_hook (line 113) | pub fn install_termination_hook() -> Result<()> {
type CommandError (line 123) | pub enum CommandError {
method to_section_report (line 143) | pub fn to_section_report(self) -> eyre::Report {
FILE: src/extensions.rs
constant STRIPPED_BINS (line 8) | pub const STRIPPED_BINS: &[&str] = &[crate::docker::DOCKER, crate::docke...
type CommandExt (line 10) | pub trait CommandExt {
method fmt_message (line 11) | fn fmt_message(&self, msg_info: &mut MessageInfo) -> String;
method print (line 14) | fn print(&self, msg_info: &mut MessageInfo) -> Result<()> {
method info (line 20) | fn info(&self, msg_info: &mut MessageInfo) -> Result<()> {
method debug (line 26) | fn debug(&self, msg_info: &mut MessageInfo) -> Result<()> {
method status_result (line 31) | fn status_result(
method run (line 38) | fn run(&mut self, msg_info: &mut MessageInfo, silence_stdout: bool) ->...
method run_and_get_status (line 40) | fn run_and_get_status(
method run_and_get_stdout (line 46) | fn run_and_get_stdout(&mut self, msg_info: &mut MessageInfo) -> Result...
method run_and_get_output (line 48) | fn run_and_get_output(&mut self, msg_info: &mut MessageInfo) -> Result...
method command_pretty (line 49) | fn command_pretty(
method command_pretty (line 57) | fn command_pretty(
method fmt_message (line 95) | fn fmt_message(&self, mut msg_info: &mut MessageInfo) -> String {
method status_result (line 124) | fn status_result(
method run (line 145) | fn run(&mut self, msg_info: &mut MessageInfo, silence_stdout: bool) ->...
method run_and_get_status (line 153) | fn run_and_get_status(
method run_and_get_stdout (line 170) | fn run_and_get_stdout(&mut self, msg_info: &mut MessageInfo) -> Result...
method run_and_get_output (line 183) | fn run_and_get_output(&mut self, msg_info: &mut MessageInfo) -> Result...
type OutputExt (line 196) | pub trait OutputExt {
method stdout (line 197) | fn stdout(&self) -> Result<String, CommandError>;
method stderr (line 198) | fn stderr(&self) -> Result<String, CommandError>;
method stdout (line 202) | fn stdout(&self) -> Result<String, CommandError> {
method stderr (line 206) | fn stderr(&self) -> Result<String, CommandError> {
type SafeCommand (line 211) | pub struct SafeCommand {
method new (line 217) | pub fn new<S: ToString>(program: S) -> Self {
method arg (line 225) | pub fn arg<S>(&mut self, arg: &S) -> &mut Self
method args (line 233) | pub fn args<I, S>(&mut self, args: I) -> &mut Self
method fmt (line 246) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method from (line 257) | fn from(s: SafeCommand) -> Self {
function env_program (line 264) | pub(crate) fn env_program(envvar: &str, program: &str) -> String {
FILE: src/file.rs
type ToUtf8 (line 12) | pub trait ToUtf8 {
method to_utf8 (line 13) | fn to_utf8(&self) -> Result<&str>;
method to_utf8 (line 17) | fn to_utf8(&self) -> Result<&str> {
method to_utf8 (line 24) | fn to_utf8(&self) -> Result<&str> {
type PathExt (line 29) | pub trait PathExt {
method as_posix_relative (line 30) | fn as_posix_relative(&self) -> Result<String>;
method as_posix_absolute (line 31) | fn as_posix_absolute(&self) -> Result<String>;
method as_posix_relative (line 81) | fn as_posix_relative(&self) -> Result<String> {
method as_posix_absolute (line 110) | fn as_posix_absolute(&self) -> Result<String> {
method as_posix_absolute (line 117) | fn as_posix_absolute(&self) -> Result<String> {
function format_prefix (line 35) | fn format_prefix(prefix: &str) -> Result<String> {
function fmt_disk (line 43) | fn fmt_disk(disk: u8) -> String {
function fmt_ns_disk (line 48) | fn fmt_ns_disk(disk: &std::ffi::OsStr) -> Result<String> {
function fmt_unc (line 65) | fn fmt_unc(server: &std::ffi::OsStr, volume: &std::ffi::OsStr) -> Result...
function read (line 161) | pub fn read<P>(path: P) -> Result<String>
function create_dir_all (line 168) | pub fn create_dir_all(path: impl AsRef<Path>) -> Result<()> {
function read_ (line 173) | fn read_(path: &Path) -> Result<String> {
function canonicalize (line 182) | pub fn canonicalize(path: impl AsRef<Path>) -> Result<PathBuf> {
function _canonicalize (line 187) | fn _canonicalize(path: &Path) -> Result<PathBuf> {
function is_wsl_absolute (line 199) | fn is_wsl_absolute(path: &str) -> bool {
function absolute_path (line 210) | pub fn absolute_path(path: impl AsRef<Path>) -> Result<PathBuf> {
function pretty_path (line 224) | pub fn pretty_path(path: impl AsRef<Path>, strip: impl for<'a> Fn(&'a st...
function shell_escape (line 250) | pub fn shell_escape(string: &str) -> Cow<'_, str> {
function maybe_canonicalize (line 267) | pub fn maybe_canonicalize(path: &Path) -> Cow<'_, OsStr> {
function write_file (line 274) | pub fn write_file(path: impl AsRef<Path>, overwrite: bool) -> Result<Fil...
function result_eq (line 306) | fn result_eq<T: PartialEq + Eq + Debug>(x: Result<T>, y: Result<T>) {
function as_posix_relative (line 314) | fn as_posix_relative() {
function as_posix_prefix (line 332) | fn as_posix_prefix() {
function is_absolute_wslpath (line 339) | fn is_absolute_wslpath() {
function as_posix_with_drive (line 350) | fn as_posix_with_drive() {
function pretty_path_windows (line 382) | fn pretty_path_windows() {
function pretty_path_linux (line 408) | fn pretty_path_linux() {
FILE: src/id.rs
function group (line 12) | pub fn group() -> u32 {
function group (line 17) | pub fn group() -> u32 {
function user (line 22) | pub fn user() -> u32 {
function user (line 27) | pub fn user() -> u32 {
function username (line 32) | pub fn username() -> Result<Option<String>> {
function username (line 59) | pub fn username() -> Result<Option<String>> {
FILE: src/interpreter.rs
function is_registered (line 8) | pub fn is_registered(target: &Target) -> Result<bool> {
FILE: src/lib.rs
constant CROSS_LABEL_DOMAIN (line 71) | pub const CROSS_LABEL_DOMAIN: &str = "org.cross-rs";
type TargetTriple (line 77) | pub enum TargetTriple {
constant DEFAULT (line 102) | pub const DEFAULT: Self = Self::X86_64UnknownLinuxGnu;
method deb_arch (line 108) | pub fn deb_arch(&self) -> Option<&'static str> {
method is_supported (line 174) | fn is_supported(&self, target: Option<&Target>) -> bool {
method triple (line 209) | pub fn triple(&self) -> &str {
method from (line 224) | fn from(s: &str) -> TargetTriple {
type Err (line 245) | type Err = std::convert::Infallible;
method from_str (line 247) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method fmt (line 253) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method from (line 259) | fn from(s: String) -> TargetTriple {
method default (line 239) | fn default() -> TargetTriple {
method serialize (line 265) | fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Er...
type Target (line 272) | pub enum Target {
constant DEFAULT (line 278) | pub const DEFAULT: Self = Self::BuiltIn {
method new_built_in (line 282) | fn new_built_in(triple: &str) -> Self {
method new_custom (line 288) | fn new_custom(triple: &str) -> Self {
method triple (line 294) | pub fn triple(&self) -> &str {
method target (line 301) | pub fn target(&self) -> &TargetTriple {
method is_apple (line 308) | fn is_apple(&self) -> bool {
method is_bare_metal (line 312) | fn is_bare_metal(&self) -> bool {
method is_builtin (line 319) | fn is_builtin(&self) -> bool {
method is_bsd (line 326) | fn is_bsd(&self) -> bool {
method is_solaris (line 330) | fn is_solaris(&self) -> bool {
method is_illumos (line 334) | fn is_illumos(&self) -> bool {
method is_android (line 338) | fn is_android(&self) -> bool {
method is_emscripten (line 342) | fn is_emscripten(&self) -> bool {
method is_linux (line 346) | fn is_linux(&self) -> bool {
method is_windows (line 350) | fn is_windows(&self) -> bool {
method needs_docker (line 354) | fn needs_docker(&self) -> bool {
method needs_interpreter (line 367) | fn needs_interpreter(&self) -> bool {
method needs_docker_seccomp (line 375) | fn needs_docker_seccomp(&self) -> bool {
method fmt (line 392) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method from (line 398) | pub fn from(triple: &str, target_list: &TargetList) -> Target {
method from (line 408) | fn from(host: TargetTriple) -> Target {
method from (line 433) | fn from(target_str: String) -> Target {
method default (line 386) | fn default() -> Target {
method serialize (line 440) | fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Er...
type CommandVariant (line 446) | pub enum CommandVariant {
method create (line 453) | pub fn create(uses_zig: bool) -> Result<CommandVariant> {
method to_str (line 460) | pub fn to_str(self) -> &'static str {
method uses_zig (line 468) | pub fn uses_zig(self) -> bool {
method is_shell (line 472) | pub(crate) fn is_shell(self) -> bool {
function warn_on_failure (line 477) | fn warn_on_failure(
function add_libc_version (line 498) | fn add_libc_version(triple: &str, zig_version: Option<&str>) -> String {
function run (line 505) | pub fn run(
function install_interpreter_if_needed (line 649) | pub fn install_interpreter_if_needed(
function get_filtered_args (line 672) | pub fn get_filtered_args(
function setup (line 746) | pub fn setup(
type CrossSetup (line 815) | pub struct CrossSetup {
type VersionMatch (line 828) | pub(crate) enum VersionMatch {
function warn_host_version_mismatch (line 835) | pub(crate) fn warn_host_version_mismatch(
function commit_info (line 877) | pub const fn commit_info() -> &'static str {
function toml (line 897) | pub fn toml(metadata: &CargoMetadata, msg_info: &mut MessageInfo) -> Res...
FILE: src/rustc.rs
type TargetList (line 14) | pub struct TargetList {
method contains (line 20) | pub fn contains(&self, triple: &str) -> bool {
type VersionMetaExt (line 25) | pub trait VersionMetaExt {
method host (line 26) | fn host(&self) -> TargetTriple;
method needs_interpreter (line 27) | fn needs_interpreter(&self) -> bool;
method commit_hash (line 28) | fn commit_hash(&self) -> String;
method host (line 32) | fn host(&self) -> TargetTriple {
method needs_interpreter (line 36) | fn needs_interpreter(&self) -> bool {
method commit_hash (line 40) | fn commit_hash(&self) -> String {
function short_commit_hash (line 48) | fn short_commit_hash(hash: &str) -> String {
function hash_from_version_string (line 59) | pub fn hash_from_version_string(version: &str, index: usize) -> String {
type QualifiedToolchain (line 84) | pub struct QualifiedToolchain {
method new (line 94) | pub fn new(
method replace_host (line 120) | pub fn replace_host(&mut self, host: &ImagePlatform) -> &mut Self {
method custom (line 129) | pub(crate) fn custom(
method host (line 189) | pub fn host(&self) -> &ImagePlatform {
method get_sysroot (line 193) | pub fn get_sysroot(&self) -> &Path {
method default (line 198) | pub fn default(config: &crate::config::Config, msg_info: &mut MessageI...
method with_picked (line 219) | pub fn with_picked(self, picked: Toolchain) -> Result<Self> {
method set_sysroot (line 234) | pub fn set_sysroot(&mut self, convert: impl Fn(&Path) -> PathBuf) {
method fmt (line 240) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method parse (line 246) | fn parse(
type Toolchain (line 281) | pub struct Toolchain {
method remove_host (line 290) | pub fn remove_host(&self) -> Self {
method fmt (line 303) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Err (line 309) | type Err = eyre::Report;
method from_str (line 311) | fn from_str(s: &str) -> Result<Self, Self::Err> {
function rustc_command (line 356) | pub fn rustc_command() -> Command {
function target_list (line 360) | pub fn target_list(msg_info: &mut MessageInfo) -> Result<TargetList> {
function sysroot (line 369) | pub fn sysroot(msg_info: &mut MessageInfo) -> Result<PathBuf> {
function version_meta (line 378) | pub fn version_meta() -> Result<rustc_version::VersionMeta> {
function bisect (line 387) | fn bisect() {
function hash_from_rustc (line 398) | fn hash_from_rustc() {
function with_picked_stable_removes_date (line 410) | fn with_picked_stable_removes_date() {
function with_picked_beta_removes_date (line 427) | fn with_picked_beta_removes_date() {
function with_picked_nightly_preserves_date (line 444) | fn with_picked_nightly_preserves_date() {
FILE: src/rustup.rs
type AvailableTargets (line 13) | pub struct AvailableTargets {
method contains (line 20) | pub fn contains(&self, target: &Target) -> bool {
method is_installed (line 25) | pub fn is_installed(&self, target: &Target) -> bool {
function setup_rustup (line 31) | pub fn setup_rustup(
function rustup_command (line 56) | fn rustup_command(msg_info: &mut MessageInfo, no_flags: bool) -> Command {
function active_toolchain (line 73) | pub fn active_toolchain(msg_info: &mut MessageInfo) -> Result<String> {
function installed_toolchains (line 86) | pub fn installed_toolchains(msg_info: &mut MessageInfo) -> Result<Vec<St...
function remove_toolchain_suffixes (line 94) | pub(crate) fn remove_toolchain_suffixes<S: AsRef<str>>(out: S) -> Vec<St...
function available_targets (line 102) | pub fn available_targets(
function version (line 164) | fn version(msg_info: &mut MessageInfo) -> Result<Version> {
function install_toolchain (line 181) | pub fn install_toolchain(toolchain: &QualifiedToolchain, msg_info: &mut ...
function install (line 193) | pub fn install(
function install_component (line 206) | pub fn install_component(
type Component (line 219) | pub enum Component<'a> {
function is_installed (line 226) | pub fn is_installed(&'a self) -> bool {
function is_not_available (line 230) | pub fn is_not_available(&'a self) -> bool {
function check_component (line 235) | pub fn check_component<'a>(
function component_is_installed (line 261) | pub fn component_is_installed(
function setup_components (line 270) | pub fn setup_components(
function rustc_channel (line 307) | fn rustc_channel(version: &Version) -> Result<Channel> {
method multirust_channel_manifest_path (line 323) | fn multirust_channel_manifest_path(&self) -> PathBuf {
method rustc_version_string (line 328) | pub fn rustc_version_string(&self) -> Result<Option<String>> {
method rustc_version (line 344) | pub fn rustc_version(&self) -> Result<Option<(Version, Channel, String)>> {
FILE: src/shell.rs
type Verbosity (line 73) | pub enum Verbosity {
method verbose (line 81) | pub fn verbose(self) -> bool {
method level (line 89) | pub fn level(&self) -> u8 {
method create (line 96) | fn create(color_choice: ColorChoice, verbose: impl Into<u8>, quiet: bo...
type ColorChoice (line 110) | pub enum ColorChoice {
type Err (line 120) | type Err = eyre::ErrReport;
method from_str (line 122) | fn from_str(s: &str) -> Result<ColorChoice> {
type MessageInfo (line 136) | pub struct MessageInfo {
method new (line 146) | pub fn new(color_choice: ColorChoice, verbosity: Verbosity) -> Message...
method create (line 160) | pub fn create(verbose: impl Into<u8>, quiet: bool, color: Option<&str>...
method caller (line 168) | pub fn caller(&mut self) -> Option<impl fmt::Display> {
method is_verbose (line 178) | pub fn is_verbose(&self) -> bool {
method as_verbosity (line 182) | fn as_verbosity<T, C: Fn(&mut MessageInfo) -> T>(&mut self, call: C, n...
method as_quiet (line 191) | pub fn as_quiet<T, C: Fn(&mut MessageInfo) -> T>(&mut self, call: C) -...
method as_normal (line 195) | pub fn as_normal<T, C: Fn(&mut MessageInfo) -> T>(&mut self, call: C) ...
method as_verbose (line 199) | pub fn as_verbose<T, C: Fn(&mut MessageInfo) -> T>(&mut self, call: C)...
method erase_line (line 203) | fn erase_line<S: OwoStream + Write>(&mut self, stream: &mut S) -> Resu...
method stdout_check_erase (line 208) | fn stdout_check_erase(&mut self) -> Result<()> {
method stderr_check_erase (line 216) | fn stderr_check_erase(&mut self) -> Result<()> {
method fatal (line 226) | pub fn fatal<T: fmt::Display>(&mut self, message: T, code: i32) -> ! {
method error (line 234) | pub fn error<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method warn (line 242) | pub fn warn<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method note (line 257) | pub fn note<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method status (line 264) | pub fn status<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method print (line 276) | pub fn print<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method info (line 284) | pub fn info<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method debug (line 296) | pub fn debug<T: fmt::Display>(&mut self, message: T) -> Result<()> {
method fatal_usage (line 306) | pub fn fatal_usage<T: fmt::Display>(
method error_usage (line 318) | fn error_usage<T: fmt::Display>(
method should_fail (line 381) | pub fn should_fail(&self) -> bool {
method from (line 395) | fn from(color_choice: ColorChoice) -> MessageInfo {
method from (line 401) | fn from(verbosity: Verbosity) -> MessageInfo {
method from (line 407) | fn from(info: (ColorChoice, Verbosity)) -> MessageInfo {
method default (line 389) | fn default() -> MessageInfo {
function cargo_envvar_bool (line 413) | pub fn cargo_envvar_bool(var: &str) -> Result<bool> {
function invalid_color (line 422) | pub fn invalid_color(provided: Option<&str>) -> ! {
function get_color_choice (line 427) | fn get_color_choice(color: Option<&str>) -> Result<ColorChoice> {
function get_verbosity (line 437) | fn get_verbosity(
type OwoStream (line 451) | trait OwoStream {
method owo (line 452) | fn owo(&self) -> owo_colors::Stream;
method owo (line 456) | fn owo(&self) -> owo_colors::Stream {
method owo (line 462) | fn owo(&self) -> owo_colors::Stream {
function default_ident (line 467) | pub fn default_ident() -> usize {
function indent (line 472) | pub fn indent(message: &str, spaces: usize) -> String {
FILE: src/temp.rs
function data_dir (line 12) | fn data_dir() -> Option<PathBuf> {
function dir (line 16) | pub fn dir() -> Result<PathBuf> {
function has_tempfiles (line 22) | pub(crate) fn has_tempfiles() -> bool {
function clean (line 29) | pub(crate) unsafe fn clean() {
function push_tempfile (line 39) | unsafe fn push_tempfile() -> Result<&'static mut tempfile::NamedTempFile> {
function pop_tempfile (line 49) | unsafe fn pop_tempfile() -> Option<tempfile::NamedTempFile> {
type TempFile (line 54) | pub struct TempFile {
method new (line 61) | pub unsafe fn new() -> Result<Self> {
method file (line 67) | pub fn file(&mut self) -> &mut tempfile::NamedTempFile {
method path (line 72) | pub fn path(&self) -> &Path {
method drop (line 78) | fn drop(&mut self) {
function push_tempdir (line 88) | unsafe fn push_tempdir() -> Result<&'static Path> {
function pop_tempdir (line 98) | unsafe fn pop_tempdir() -> Option<tempfile::TempDir> {
type TempDir (line 103) | pub struct TempDir {
method new (line 110) | pub unsafe fn new() -> Result<Self> {
method path (line 117) | pub fn path(&self) -> &'static Path {
method drop (line 123) | fn drop(&mut self) {
FILE: src/tests.rs
function get_cargo_workspace (line 17) | pub fn get_cargo_workspace() -> &'static Path {
function walk_dir (line 29) | pub fn walk_dir<'a>(
function target_mismatch (line 51) | pub fn target_mismatch() {
function check_newlines (line 141) | fn check_newlines() -> crate::Result<()> {
FILE: src/tests/rustup.rs
function remove_toolchain_suffixes (line 4) | fn remove_toolchain_suffixes() {
FILE: src/tests/toml.rs
function toml_check (line 17) | fn toml_check() -> Result<(), Box<dyn std::error::Error>> {
function text_line_no (line 87) | pub fn text_line_no(text: &str, index: usize) -> usize {
FILE: xtask/src/build_docker_image.rs
type BuildDockerImage (line 14) | pub struct BuildDockerImage {
function locate_dockerfile (line 85) | fn locate_dockerfile(
function build_docker_image (line 102) | pub fn build_docker_image(
function has_native_image (line 354) | fn has_native_image(
function determine_image_name (line 388) | pub fn determine_image_name(
function job_summary (line 433) | pub fn job_summary(
FILE: xtask/src/changelog.rs
function changelog (line 16) | pub fn changelog(args: Changelog, msg_info: &mut MessageInfo) -> cross::...
type Changelog (line 24) | pub enum Changelog {
type BuildChangelog (line 32) | pub struct BuildChangelog {
type ValidateChangelog (line 42) | pub struct ValidateChangelog {
type IdType (line 52) | enum IdType {
method numbers (line 58) | fn numbers(&self) -> &[u64] {
method max_number (line 65) | fn max_number(&self) -> u64 {
method parse_stem (line 69) | fn parse_stem(file_stem: &str) -> cross::Result<IdType> {
method parse_changelog (line 86) | fn parse_changelog(prs: &str) -> cross::Result<IdType> {
method partial_cmp (line 98) | fn partial_cmp(&self, other: &IdType) -> Option<cmp::Ordering> {
method cmp (line 104) | fn cmp(&self, other: &IdType) -> cmp::Ordering {
type ChangelogType (line 111) | enum ChangelogType {
method from_header (line 120) | fn from_header(s: &str) -> cross::Result<Self> {
method sort_by (line 131) | fn sort_by(&self) -> u32 {
method partial_cmp (line 143) | fn partial_cmp(&self, other: &ChangelogType) -> Option<cmp::Ordering> {
method cmp (line 149) | fn cmp(&self, other: &ChangelogType) -> cmp::Ordering {
type ChangelogContents (line 156) | struct ChangelogContents {
method sort_by (line 167) | fn sort_by(&self) -> (&ChangelogType, &str, &bool) {
method partial_cmp (line 173) | fn partial_cmp(&self, other: &ChangelogContents) -> Option<cmp::Orderi...
method cmp (line 179) | fn cmp(&self, other: &ChangelogContents) -> cmp::Ordering {
method fmt (line 185) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type ChangelogEntry (line 194) | struct ChangelogEntry {
method new (line 200) | fn new(id: IdType, contents: ChangelogContents) -> Self {
method parse (line 204) | fn parse(s: &str, kind: ChangelogType) -> cross::Result<Self> {
method from_object (line 230) | fn from_object(id: IdType, value: serde_json::Value) -> cross::Result<...
method from_value (line 234) | fn from_value(id: IdType, mut value: serde_json::Value) -> cross::Resu...
method fmt (line 249) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function deduplicate_entries (line 267) | fn deduplicate_entries(original: &mut Vec<ChangelogEntry>) {
type Changes (line 280) | struct Changes {
method sort_descending (line 289) | fn sort_descending(&mut self) {
method deduplicate (line 297) | fn deduplicate(&mut self) {
method merge (line 305) | fn merge(&mut self, other: &mut Self) {
method push (line 313) | fn push(&mut self, entry: ChangelogEntry) {
method fmt (line 336) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function file_stem (line 347) | fn file_stem(path: &Path) -> cross::Result<&str> {
function read_changes (line 353) | fn read_changes(changes_dir: &Path) -> cross::Result<Changes> {
function read_changelog (line 384) | fn read_changelog(root: &Path) -> cross::Result<(String, Changes, String...
function delete_changes (line 429) | fn delete_changes(root: &Path) -> cross::Result<()> {
function get_current_date (line 445) | pub fn get_current_date() -> String {
function build_changelog_from_dir (line 453) | fn build_changelog_from_dir(
function build_changelog (line 482) | pub fn build_changelog(
function validate_changelog (line 513) | pub fn validate_changelog(
function test_id_type_parse_stem (line 594) | fn test_id_type_parse_stem() -> cross::Result<()> {
function test_id_type_parse_changelog (line 609) | fn test_id_type_parse_changelog() -> cross::Result<()> {
function changelog_type_sort (line 623) | fn changelog_type_sort() {
function change_log_type_from_header (line 629) | fn change_log_type_from_header() -> cross::Result<()> {
function changelog_contents_deserialize (line 636) | fn changelog_contents_deserialize() -> cross::Result<()> {
function changelog_entry_display (line 679) | fn changelog_entry_display() {
function read_template_changes (line 708) | fn read_template_changes() -> cross::Result<()> {
function read_template_changelog (line 791) | fn read_template_changelog() -> cross::Result<()> {
function build_changelog_test (line 835) | fn build_changelog_test(release: Option<&str>) -> cross::Result<String> {
function test_build_changelog_no_release (line 844) | fn test_build_changelog_no_release() -> cross::Result<()> {
function test_build_changelog_dev_release (line 871) | fn test_build_changelog_dev_release() -> cross::Result<()> {
function test_build_changelog_release (line 891) | fn test_build_changelog_release() -> cross::Result<()> {
FILE: xtask/src/ci.rs
type CiJob (line 9) | pub enum CiJob {
function ci (line 32) | pub fn ci(args: CiJob, metadata: CargoMetadata) -> cross::Result<()> {
FILE: xtask/src/ci/target_matrix.rs
type TargetMatrix (line 11) | pub struct TargetMatrix {
method run (line 35) | pub(crate) fn run(&self) -> Result<(), color_eyre::Report> {
type TargetMatrixSub (line 23) | pub enum TargetMatrixSub {
function apply_ci_labels (line 131) | fn apply_ci_labels(prs: &[&str], app: &mut TargetMatrixArgs) -> Result<(...
function apply_has_no_ci_tests (line 153) | fn apply_has_no_ci_tests(prs: &[&str], app: &mut TargetMatrixArgs) -> Re...
function apply_has_no_ci_target (line 165) | fn apply_has_no_ci_target(prs: &[&str], app: &mut TargetMatrixArgs) -> R...
function parse_gh_labels (line 176) | fn parse_gh_labels(pr: &str) -> cross::Result<Vec<String>> {
function has_no_ci_target_label (line 198) | fn has_no_ci_target_label(pr: &str) -> cross::Result<bool> {
function has_no_ci_tests_label (line 202) | fn has_no_ci_tests_label(pr: &str) -> cross::Result<bool> {
function process_merge_group (line 207) | fn process_merge_group(ref_: &str) -> cross::Result<&str> {
function current_pr (line 218) | fn current_pr() -> Option<String> {
function process_try_comment (line 229) | fn process_try_comment(message: &str) -> cross::Result<(bool, TargetMatr...
type TargetMatrixElement (line 247) | struct TargetMatrixElement<'a> {
function bool_negate (line 273) | fn bool_negate(b: &bool) -> bool {
type TargetMatrixArgs (line 279) | struct TargetMatrixArgs {
method filter (line 335) | pub fn filter(&self, matrix: &mut Vec<CiTarget>) {
method tests (line 382) | fn tests(&self) -> Result<serde_json::Value, serde_json::Error> {
method default (line 317) | fn default() -> Self {
function run (line 423) | fn run<'a>(args: impl IntoIterator<Item = &'a str>) -> Vec<CiTarget> {
function it_works (line 433) | fn it_works() {
function exact (line 451) | fn exact() {
function glob (line 458) | fn glob() {
function ensure_filter_works (line 466) | fn ensure_filter_works() {
function all (line 481) | fn all() {
function none (line 489) | fn none() {
function merge_group (line 495) | fn merge_group() {
FILE: xtask/src/codegen.rs
type Codegen (line 9) | pub struct Codegen {}
function codegen (line 11) | pub fn codegen(Codegen { .. }: Codegen) -> cross::Result<()> {
function docker_images (line 17) | pub fn docker_images() -> String {
function ensure_correct_codegen (line 67) | pub fn ensure_correct_codegen() -> cross::Result<()> {
FILE: xtask/src/crosstool.rs
constant DEFAULT_GCC_VERSION (line 11) | const DEFAULT_GCC_VERSION: &str = "8.3.0";
constant DEFAULT_GLIBC_VERSION (line 12) | const DEFAULT_GLIBC_VERSION: &str = "2.17.0";
constant DEFAULT_UCLIBC_VERSION (line 13) | const DEFAULT_UCLIBC_VERSION: &str = "1.0.31";
constant DEFAULT_MUSL_VERSION (line 14) | const DEFAULT_MUSL_VERSION: &str = "1.1.24";
constant DEFAULT_NEWLIB_VERSION (line 15) | const DEFAULT_NEWLIB_VERSION: &str = "3.1.0.20181231";
constant DEFAULT_LINUX_VERSION (line 16) | const DEFAULT_LINUX_VERSION: &str = "4.19.21";
constant DOCKER (line 17) | const DOCKER: &str = "docker";
constant CT_NG (line 18) | const CT_NG: &str = "crosstool-ng";
constant TOOLCHAINS (line 19) | const TOOLCHAINS: &str = "cross-toolchains";
constant CT_CONFIG (line 20) | const CT_CONFIG: &str = "crosstool-config";
type ConfigureCrosstool (line 23) | pub struct ConfigureCrosstool {
function locate_ctng_config (line 47) | fn locate_ctng_config(
function read_config_dir (line 69) | fn read_config_dir(dir: &Path) -> cross::Result<Vec<String>> {
function configure_glibc (line 82) | fn configure_glibc(
function configure_uclibc (line 128) | fn configure_uclibc(
function configure_musl (line 223) | fn configure_musl(
function configure_newlib (line 243) | fn configure_newlib(
function configure_target (line 287) | fn configure_target(
function configure_crosstool (line 411) | pub fn configure_crosstool(
FILE: xtask/src/hooks.rs
constant CARGO_FLAGS (line 13) | const CARGO_FLAGS: &[&str] = &["--all-features", "--all-targets", "--wor...
type Check (line 16) | pub struct Check {
type Test (line 29) | pub struct Test {
function cargo_fmt (line 39) | fn cargo_fmt(msg_info: &mut MessageInfo, channel: Option<&str>) -> cross...
function cargo_clippy (line 46) | fn cargo_clippy(msg_info: &mut MessageInfo, channel: Option<&str>) -> cr...
function cargo_test (line 55) | fn cargo_test(msg_info: &mut MessageInfo, channel: Option<&str>) -> cros...
function splitlines (line 62) | fn splitlines(string: String) -> Vec<String> {
function staged_files (line 66) | fn staged_files(msg_info: &mut MessageInfo) -> cross::Result<Vec<String>> {
function all_files (line 73) | fn all_files(msg_info: &mut MessageInfo) -> cross::Result<Vec<String>> {
function is_shell_script (line 80) | fn is_shell_script(path: impl AsRef<Path>) -> cross::Result<bool> {
function shellcheck (line 99) | fn shellcheck(all: bool, msg_info: &mut MessageInfo) -> cross::Result<()> {
function parse_command (line 121) | fn parse_command(value: &str) -> cross::Result<Vec<String>> {
function python_dir (line 125) | fn python_dir(metadata: &cross::CargoMetadata) -> PathBuf {
function python_env (line 129) | fn python_env(cmd: &mut Command, metadata: &cross::CargoMetadata) {
function python_lint (line 137) | fn python_lint(flake8: Option<&str>, msg_info: &mut MessageInfo) -> cros...
function python_test (line 157) | fn python_test(tox: Option<&str>, msg_info: &mut MessageInfo) -> cross::...
function check (line 180) | pub fn check(
function test (line 207) | pub fn test(
FILE: xtask/src/install_git_hooks.rs
type InstallGitHooks (line 6) | pub struct InstallGitHooks {}
function install_git_hooks (line 8) | pub fn install_git_hooks(msg_info: &mut MessageInfo) -> cross::Result<()> {
FILE: xtask/src/main.rs
type Cli (line 29) | struct Cli {
type CliHidden (line 48) | struct CliHidden {
type Commands (line 54) | enum Commands {
function is_toolchain (line 77) | fn is_toolchain(toolchain: &str) -> cross::Result<String> {
function main (line 92) | pub fn main() -> cross::Result<()> {
function get_container_engine (line 130) | fn get_container_engine(
FILE: xtask/src/target_info.rs
constant TARGET_INFO_SCRIPT (line 10) | const TARGET_INFO_SCRIPT: &str = include_str!("target_info.sh");
type TargetInfo (line 13) | pub struct TargetInfo {
function image_info (line 30) | fn image_info(
function target_info (line 59) | pub fn target_info(
FILE: xtask/src/util.rs
function get_cargo_workspace (line 16) | pub fn get_cargo_workspace() -> &'static Path {
type CiTarget (line 32) | pub struct CiTarget {
method has_test (line 76) | pub fn has_test(&self, target: &str) -> bool {
method to_image_target (line 81) | pub fn to_image_target(&self) -> crate::ImageTarget {
method builds_image (line 88) | pub fn builds_image(&self) -> bool {
method platforms (line 92) | pub fn platforms(&self) -> &[String] {
function is_false (line 71) | pub fn is_false(b: &bool) -> bool {
function get_matrix (line 112) | pub fn get_matrix() -> &'static Vec<CiTarget> {
function with_section_reports (line 127) | pub fn with_section_reports(
function format_repo (line 137) | pub fn format_repo(registry: &str, repository: &str) -> String {
function pull_image (line 149) | pub fn pull_image(
type ImageTarget (line 162) | pub struct ImageTarget {
method image_name (line 168) | pub fn image_name(&self, repository: &str, tag: &str) -> String {
method alt (line 172) | pub fn alt(&self) -> String {
method has_ci_image (line 181) | pub fn has_ci_image(&self) -> bool {
method is_standard_target_image (line 189) | pub fn is_standard_target_image(&self) -> bool {
method is_toolchain_image (line 201) | pub fn is_toolchain_image(&self) -> bool {
method needs_workspace_root_context (line 206) | pub fn needs_workspace_root_context(&self) -> bool {
method is_armv6 (line 210) | pub fn is_armv6(&self) -> bool {
method is_armv7 (line 217) | pub fn is_armv7(&self) -> bool {
type Err (line 226) | type Err = std::convert::Infallible;
method from_str (line 228) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method fmt (line 250) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function has_nightly (line 259) | pub fn has_nightly(msg_info: &mut MessageInfo) -> cross::Result<bool> {
function get_channel_prefer_nightly (line 266) | pub fn get_channel_prefer_nightly<'a>(
function cargo (line 279) | pub fn cargo(channel: Option<&str>) -> Command {
function cargo_metadata (line 290) | pub fn cargo_metadata(msg_info: &mut MessageInfo) -> cross::Result<cross...
function project_dir (line 295) | pub fn project_dir(msg_info: &mut MessageInfo) -> cross::Result<PathBuf> {
function gha_print (line 309) | pub fn gha_print(content: &str) {
function gha_error (line 314) | pub fn gha_error(content: &str) {
function gha_output (line 319) | pub fn gha_output(tag: &str, content: &str) -> cross::Result<()> {
function read_dockerfiles (line 328) | pub fn read_dockerfiles(msg_info: &mut MessageInfo) -> cross::Result<Vec...
function write_to_string (line 345) | pub fn write_to_string(path: &Path, contents: &str) -> cross::Result<()> {
function write_to_gha_env_file (line 356) | pub fn write_to_gha_env_file(env_name: &str, contents: &str) -> cross::R...
function test_parse_image_target (line 380) | fn test_parse_image_target() {
function check_ubuntu_base (line 414) | fn check_ubuntu_base() -> cross::Result<()> {
Condensed preview — 361 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,109K chars).
[
{
"path": ".cargo/config.toml",
"chars": 98,
"preview": "[alias]\nxtask = [\"run\", \"-p\", \"xtask\", \"--\"]\nbuild-docker-image = [\"xtask\", \"build-docker-image\"]\n"
},
{
"path": ".changes/1006.json",
"chars": 109,
"preview": "{\n \"type\": \"added\",\n \"description\": \"add CentOS7-compatible target for aarch64\",\n \"issues\": [528]\n}\n"
},
{
"path": ".changes/1018.json",
"chars": 133,
"preview": "{\n \"description\": \"deny installation of armhf debian packages for the arm-unknown-linux-gnueabihf target.\",\n \"type"
},
{
"path": ".changes/1023.json",
"chars": 128,
"preview": "{\n \"description\": \"support different Android NDK, API, and Android versions using Docker build args.\",\n \"type\": \"a"
},
{
"path": ".changes/1024.json",
"chars": 133,
"preview": "{\n \"description\": \"`rust-std` is no longer downloaded when using `build-std = true`\",\n \"type\": \"fixed\",\n \"break"
},
{
"path": ".changes/1028-1132.json",
"chars": 1072,
"preview": "[\n {\n \"description\": \"link to libgcc for armv5te-unknown-linux-musleabi.\",\n \"type\": \"fixed\"\n },\n "
},
{
"path": ".changes/1032.json",
"chars": 119,
"preview": "{\n \"description\": \"allow disabling buildkit for container engines lacking buildkit support.\",\n \"type\": \"added\"\n}\n"
},
{
"path": ".changes/1033.json",
"chars": 99,
"preview": "{\n \"description\": \"fix --cache-from using podman.\",\n \"type\": \"fixed\",\n \"issues\": [1031]\n}\n"
},
{
"path": ".changes/1038-1220-1482.json",
"chars": 89,
"preview": "[\n {\n \"description\": \"bump MSRV to 1.77.2\",\n \"type\": \"internal\"\n }\n]\n"
},
{
"path": ".changes/1039.json",
"chars": 97,
"preview": "{\n \"description\": \"support overlay and fuse-overlayfs storage drivers\",\n \"type\": \"added\"\n}\n"
},
{
"path": ".changes/1049-1142.json",
"chars": 125,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"stop parsing arguments to `cross run` after `--`\",\n \"issues\": [1048, 114"
},
{
"path": ".changes/1054.json",
"chars": 134,
"preview": "{\n \"type\": \"internal\",\n \"description\": \"change the unique container ID to be unique based off the toolchain and sy"
},
{
"path": ".changes/1057.json",
"chars": 176,
"preview": "{\n \"description\": \"fix mount paths outside of the workspace mount directory on Windows and those provided as a WSL pa"
},
{
"path": ".changes/1063-1125-1134.json",
"chars": 520,
"preview": "[\n {\n \"type\": \"changed\",\n \"description\": \"changed musl targets to use static-pie linkage by default, co"
},
{
"path": ".changes/1073.json",
"chars": 97,
"preview": "{\n \"type\": \"added\",\n \"description\": \"passthrough cross environment variables by default\"\n}\n"
},
{
"path": ".changes/1078.json",
"chars": 252,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"Fix custom image names for images with a trailing '-' character.\\ncustom imag"
},
{
"path": ".changes/1084.json",
"chars": 117,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"fixed remote docker data volume paths on windows\",\n \"issues\": [1081]\n}\n"
},
{
"path": ".changes/1085.json",
"chars": 88,
"preview": "{\n \"type\": \"added\",\n \"description\": \"support custom toolchains without rustup.\"\n}\n"
},
{
"path": ".changes/1105.json",
"chars": 108,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"explicitly prefer `-ar` to `-gcc-ar`.\",\n \"issues\": [1100]\n}\n"
},
{
"path": ".changes/1112.json",
"chars": 245,
"preview": "[\n {\n \"description\": \"fixed CMake support for Android and newlib targets.\",\n \"type\": \"fixed\",\n \""
},
{
"path": ".changes/1118.json",
"chars": 98,
"preview": "{\n \"type\": \"added\",\n \"description\": \"added ARMv8-M newlib targets.\",\n \"issues\": [1116]\n}\n"
},
{
"path": ".changes/1123.json",
"chars": 219,
"preview": "{\n \"description\": \"support external C/C++ dependencies using C11/C++11 threads for MinGW targets by switching linkers"
},
{
"path": ".changes/1138.json",
"chars": 111,
"preview": "{\n \"description\": \"explicitly specify ar for all toolchains\",\n \"type\": \"changed\",\n \"issues\": [1137]\n}\n"
},
{
"path": ".changes/1159.json",
"chars": 115,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"use `[workspace.metadata.cross]` as an alternative to `Cross.toml`\"\n}\n"
},
{
"path": ".changes/1160.json",
"chars": 128,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"don't warn when toolchain version is explicitly provided.\",\n \"issues\": ["
},
{
"path": ".changes/1164.json",
"chars": 114,
"preview": "{\n \"type\": \"internal\",\n \"description\": \"add fallback mirrors for FreeBSD packages.\",\n \"issues\": [1162]\n}\n"
},
{
"path": ".changes/1166.json",
"chars": 125,
"preview": "{\n \"description\": \"freebsd: include memstat in build image to fix build with libc 0.2.138 and up.\",\n \"type\": \"fixe"
},
{
"path": ".changes/1183.json",
"chars": 143,
"preview": "{\n \"description\": \"resolve issue when using `pre-build` and `image.toolchain` in `Cargo.toml`\",\n \"type\": \"fixed\",\n"
},
{
"path": ".changes/1199.json",
"chars": 130,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"use current target_dir path when copying build artifacts back\",\n \"issues\":"
},
{
"path": ".changes/1207.json",
"chars": 120,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"properly copy directories when using `CROSS_REMOTE`\",\n \"issues\": [1206]\n}\n"
},
{
"path": ".changes/1220.json",
"chars": 133,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"don't pass `--target-dir` in remote context when it's not needed\",\n \"issue"
},
{
"path": ".changes/1246.json",
"chars": 98,
"preview": "{\n \"description\": \"fix support for bare metal targets other than thumb\",\n \"type\": \"fixed\"\n}\n"
},
{
"path": ".changes/1248.json",
"chars": 124,
"preview": "{\n \"description\": \"customize `--cache-from` and `--cache-to` options for `build-docker-image`\",\n \"type\": \"internal"
},
{
"path": ".changes/1260.json",
"chars": 150,
"preview": "{\n \"description\": \"fix podman bind mounts on macOS by removing SELinux labels.\",\n \"issues\": [756],\n \"type\": \"fi"
},
{
"path": ".changes/1265.json",
"chars": 98,
"preview": "{\n \"description\": \"replace `ctrlc` signal handler with `signal-hook`\",\n \"type\": \"changed\"\n}\n"
},
{
"path": ".changes/1271.json",
"chars": 104,
"preview": "{\n \"description\": \"add aarch64-unknown-freebsd image.\",\n \"type\": \"added\",\n \"breaking\": false\n}\n"
},
{
"path": ".changes/1280.json",
"chars": 155,
"preview": "{\n \"description\": \"Allow to run arbitrary commands in containers using `cross-util run ...`\",\n \"issues\": [1266],\n \"ty"
},
{
"path": ".changes/1317.json",
"chars": 150,
"preview": "{\n \"description\": \"Re-add PKG_CONFIG_PATH for the arm-unknown-linux-gnueabihf target.\",\n \"issues\": [1316],\n \"type\": \""
},
{
"path": ".changes/1325.json",
"chars": 115,
"preview": "{\n \"description\": \"create CACHEDIR.TAG during custom docker build\",\n \"type\": \"fixed\",\n \"issues\": [1324]\n}\n"
},
{
"path": ".changes/1330-1349.json",
"chars": 92,
"preview": "{\n \"description\": \"update cargo-zigbuild from 0.17.2 to 0.17.3\",\n \"type\": \"changed\"\n}\n"
},
{
"path": ".changes/1333.json",
"chars": 98,
"preview": "{\n \"description\": \"set arm-unknown-linux-gnueabihf to use glibc 2.31\",\n \"type\": \"changed\"\n}\n"
},
{
"path": ".changes/1340.json",
"chars": 126,
"preview": "{\n \"description\": \"don't error when a non-provided target is used with only a dockerfile specified\",\n \"type\": \"fix"
},
{
"path": ".changes/1342.json",
"chars": 224,
"preview": "[\n {\n \"description\": \"fix `--list` showing cross commands for the host\",\n \"type\": \"fixed\"\n },\n {\n"
},
{
"path": ".changes/1346.json",
"chars": 87,
"preview": "{\n \"description\": \"bump musl to 1.2.3, like done in rust 1.71\",\n \"type\": \"changed\"\n}\n"
},
{
"path": ".changes/1348.json",
"chars": 73,
"preview": "{\n \"description\": \"add `libexecinfo.so` in netbsd\",\n \"type\": \"added\"\n}\n"
},
{
"path": ".changes/1373.json",
"chars": 106,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"fix wineboot silently failing on qemu\",\n \"issues\": [1372]\n}\n"
},
{
"path": ".changes/1374-1490.json",
"chars": 93,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"update wine to 9.0.0.0\",\n \"issues\": [1372]\n}\n"
},
{
"path": ".changes/1385.json",
"chars": 116,
"preview": "{\n \"description\": \"Set PKG_CONFIG_PATH in the FreeBSD Dockerfile.\",\n \"issues\": [1384],\n \"type\": \"fixed\"\n}\n\n"
},
{
"path": ".changes/1391.json",
"chars": 140,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"Add `-idirafter/usr/include` to bindgen's clang invocation on GNU/Linux\",\n "
},
{
"path": ".changes/1399.json",
"chars": 147,
"preview": "{\n \"description\": \"fix creating `initrd` when using debian `ports` mirror and compressed kernel modules\",\n \"issues\": ["
},
{
"path": ".changes/1403-1411.json",
"chars": 323,
"preview": "[{\n \"type\": \"fixed\",\n \"description\": \"switch to freebsd 13.2 following 12.4 EoL\",\n \"issues\": [1390]\n},\n {\n "
},
{
"path": ".changes/1420.json",
"chars": 95,
"preview": "{\n \"description\": \"set the required environment variables in the runner\",\n \"type\": \"fixed\"\n}\n"
},
{
"path": ".changes/1458.json",
"chars": 164,
"preview": "{\n \"description\": \"add gfortran for target *-gnu*, *-musl*, *-freebsd*, *-solaris*, *-dragonfly*, *-illumos*, *-netbsd*"
},
{
"path": ".changes/1465.json",
"chars": 92,
"preview": "{\n \"type\": \"added\",\n \"description\": \"add loongarch64 support\",\n \"issues\": [1404]\n}\n"
},
{
"path": ".changes/1466.json",
"chars": 139,
"preview": "{\n \"type\": \"added\",\n \"description\": \"Upgrade qemu and integrate qemu-user runners for loongarch64-linux-gnu\",\n "
},
{
"path": ".changes/1468.json",
"chars": 117,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"use defconfig for ct-ng, minimizing the config\",\n \"issues\": [1335]\n}\n"
},
{
"path": ".changes/1481.json",
"chars": 105,
"preview": "{\n \"description\": \"allow pass-through environment variables to contain numbers\",\n \"type\": \"fixed\"\n}"
},
{
"path": ".changes/1483.json",
"chars": 97,
"preview": "{\n \"description\": \"Fix paths when using `CROSS_CONTAINER_IN_CONTAINER`\",\n \"type\": \"fixed\"\n}"
},
{
"path": ".changes/1485.json",
"chars": 158,
"preview": "{\n \"description\": \"Use `/proc/self/mountinfo` as a fallback for `docker inspect` if using `HOSTNAME` fails\",\n \"iss"
},
{
"path": ".changes/1488.json",
"chars": 138,
"preview": "{\n \"description\": \"Allow `build-std` to take an array of crate names\",\n \"issues\": [896],\n \"type\": \"changed\",\n\t\""
},
{
"path": ".changes/1489.json",
"chars": 75,
"preview": "{\n \"description\": \"Simplify config internals\",\n \"type\": \"internal\"\n}\n"
},
{
"path": ".changes/1491.json",
"chars": 132,
"preview": "{\n \"description\": \"Allow specifying only a tag or subtarget for images in config\",\n \"issues\": [1169],\n \"type\": "
},
{
"path": ".changes/1494.json",
"chars": 95,
"preview": "{\n \"description\": \"Fix `zig.image` precedence\",\n \"type\": \"fixed\",\n \"breaking\": true\n}\n"
},
{
"path": ".changes/1495.json",
"chars": 114,
"preview": "{\n \"description\": \"Fix `*-solaris` targets\",\n \"issues\": [1424],\n \"type\": \"fixed\",\n \"breaking\": true\n}\n"
},
{
"path": ".changes/1525.json",
"chars": 107,
"preview": "{\n \"description\": \"Fix riscv64gc-unknown-linux-gnu target\",\n \"issues\": [1423],\n \"type\": \"fixed\"\n}\n"
},
{
"path": ".changes/1540.json",
"chars": 135,
"preview": "{\n \"description\": \"Upgrade the crosstool for the loongarch64-unknown-linux-gnu target\",\n \"issues\": [1538],\n \"ty"
},
{
"path": ".changes/1557.json",
"chars": 103,
"preview": "{\n \"type\": \"added\",\n \"description\": \"add loongarch64-linux-musl support\",\n \"issues\": [1556]\n}\n"
},
{
"path": ".changes/1574.json",
"chars": 100,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"`dockerfile` path is now relative to cargo workspace root\"\n}\n"
},
{
"path": ".changes/1623.json",
"chars": 127,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"fixed an issue where cross would look for metadata.cross outside the workspac"
},
{
"path": ".changes/1625.json",
"chars": 69,
"preview": "{\n \"description\": \"bump ct-ng to 1.27.0\",\n \"type\": \"changed\"\n}\n"
},
{
"path": ".changes/1630.json",
"chars": 128,
"preview": "{\n \"type\": \"added\",\n \"description\": \"Add docker platform support for `linux/arm64/v8` target for many Ubuntu-based tar"
},
{
"path": ".changes/1641.json",
"chars": 117,
"preview": "{\n \"description\": \"Update binutils to 2.38 in illumos and solaris\",\n \"issues\": [1639],\n \"type\": \"changed\"\n}\n"
},
{
"path": ".changes/1647.json",
"chars": 117,
"preview": "{\n \"description\": \"use `-q` when gathering the installed toolchains\",\n \"issues\": [1645],\n \"type\": \"fixed\"\n}\n"
},
{
"path": ".changes/1651.json",
"chars": 147,
"preview": "{\n \"description\": \"Fix BINDGEN_EXTRA_CLANG_ARGS for x86_64-unknown-illumos\",\n \"issues\": [1644],\n \"type\": \"fixed"
},
{
"path": ".changes/1664.json",
"chars": 109,
"preview": "{\n \"type\": \"added\",\n \"description\": \"add riscv64gc-unknown-linux-musl support\",\n \"issues\": [1197]\n}\n"
},
{
"path": ".changes/1674.json",
"chars": 131,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"use zstd to extract the compressed file as FreeBSD do so. also, bump the gcc "
},
{
"path": ".changes/1681.json",
"chars": 132,
"preview": "{\n \"description\": \"also recognize active and default as installed toolchains\",\n \"issues\": [1645, 1678],\n \"type\""
},
{
"path": ".changes/554.json",
"chars": 125,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"add the `--force-non-host` flag for newer rustup versions\",\n \"issues\": [53"
},
{
"path": ".changes/589.json",
"chars": 126,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"Ensure podman builds use non-interactive package installs.\",\n \"issues\": [5"
},
{
"path": ".changes/591-1095.json",
"chars": 696,
"preview": "[\n {\n \"description\": \"update Ubuntu images to 20.04 LTS.\",\n \"type\": \"changed\",\n \"breaking\": true"
},
{
"path": ".changes/661.json",
"chars": 199,
"preview": "{\n \"description\": \"When cross has given a warning, it will now quit instead of continuing with `cargo` when run in CI"
},
{
"path": ".changes/817.json",
"chars": 405,
"preview": "[\n {\n \"description\": \"Images can now specify a certain toolchain via `target.{target}.image.toolchain`\",\n \"breaki"
},
{
"path": ".changes/880-1111.json",
"chars": 199,
"preview": "{\n \"description\": \"added a zig-based image (v0.10.0), allowing multiple targets to be built from the same image, usin"
},
{
"path": ".changes/918.json",
"chars": 120,
"preview": "{\n \"description\": \"use JSON-based files to autogenerate CHANGELOG.md\",\n \"issues\": [662],\n \"type\": \"internal\"\n}\n"
},
{
"path": ".changes/931.json",
"chars": 133,
"preview": "{\n \"description\": \"deny installation of debian packages that conflict with our cross-compiler toolchains.\",\n \"type"
},
{
"path": ".changes/934.json",
"chars": 118,
"preview": "{\n \"type\": \"added\",\n \"description\": \"add support for pre-build hooks with remote docker\",\n \"issues\": [928]\n}\n"
},
{
"path": ".changes/937.json",
"chars": 117,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"support Windows-style and absolute manifest paths\",\n \"issues\": [935]\n}\n"
},
{
"path": ".changes/939.json",
"chars": 150,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"Remove `/project` mounting, instead always mount in the same path as on the"
},
{
"path": ".changes/942.json",
"chars": 390,
"preview": "[\n {\n \"description\": \"use non-canonical paths for mount locations.\",\n \"type\": \"changed\",\n \"issue"
},
{
"path": ".changes/945.json",
"chars": 111,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"fix pre-build hook image naming with podman\",\n \"issues\": [944]\n}\n"
},
{
"path": ".changes/947.json",
"chars": 343,
"preview": "[\n {\n \"type\": \"internal\",\n \"description\": \"resolve symlinks to cargo and xargo home before mounting\",\n "
},
{
"path": ".changes/952.json",
"chars": 101,
"preview": "{\n \"description\": \"run non-x86 binaries natively if on a compatible host.\",\n \"type\": \"added\"\n}\n"
},
{
"path": ".changes/955.json",
"chars": 119,
"preview": "{\n \"description\": \"Update QEMU to version 7.0.0 for Ubuntu targets\",\n \"type\": \"changed\",\n \"breaking\": false\n}\n"
},
{
"path": ".changes/956.json",
"chars": 104,
"preview": "{\n \"description\": \"use Wine from Ubuntu 20.04 WineHQ repo\",\n \"type\": \"changed\",\n \"breaking\": false\n}\n"
},
{
"path": ".changes/957-1393.json",
"chars": 103,
"preview": "{\n \"description\": \"use latest Debian kernel images\",\n \"type\": \"changed\",\n \"breaking\": false\n}\n"
},
{
"path": ".changes/962.json",
"chars": 150,
"preview": "{\n \"description\": \"fix SELinux labels to allow use in multiple containers and/or the host filesystem.\",\n \"type\": \""
},
{
"path": ".changes/964.json",
"chars": 93,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"don't keep stdin open when running containers.\"\n}\n"
},
{
"path": ".changes/968.json",
"chars": 112,
"preview": "{\n \"description\": \"only print rustup --verbose if `-vv` or `CROSS_VERBOSE=1` is used\",\n \"type\": \"fixed\"\n}\n"
},
{
"path": ".changes/974.json",
"chars": 314,
"preview": "[\n {\n \"description\": \"change `mips64-unknown-linux-muslabi64` target to hard-float target.\",\n \"type\": \""
},
{
"path": ".changes/982.json",
"chars": 121,
"preview": "{\n \"type\": \"internal\",\n \"description\": \"use generic dockerfiles for when the toolchain and image platfom match.\"\n}"
},
{
"path": ".changes/984.json",
"chars": 131,
"preview": "{\n \"description\": \"added linux images for `riscv64gc-unknown-linux-gnu` to allow full system emulation.\",\n \"type\":"
},
{
"path": ".changes/987.json",
"chars": 165,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"link to libgcc for `armv5te-unknown-linux-musleabi` to fix missing `__sync_X_"
},
{
"path": ".changes/989.json",
"chars": 125,
"preview": "{\n \"type\": \"changed\",\n \"description\": \"add default nix_store value to solve nix-related issues\",\n \"issues\": [26"
},
{
"path": ".changes/994.json",
"chars": 149,
"preview": "{\n \"type\": \"fixed\",\n \"description\": \"fixed wrong path used for target when pre-building in container in container "
},
{
"path": ".changes/README.md",
"chars": 1456,
"preview": "# Changes\n\nThis stores changes to automatically generate the changelog, to avoid merge conflicts. Files should be in a J"
},
{
"path": ".changes/template/940.json",
"chars": 489,
"preview": "[\n {\n \"description\": \"this is one added entry.\",\n \"issues\": [630],\n \"type\": \"added\"\n },\n {"
},
{
"path": ".changes/template/978.json",
"chars": 123,
"preview": "{\n \"description\": \"sample description for a PR adding one CHANGELOG entry.\",\n \"issues\": [437],\n \"type\": \"fixed\""
},
{
"path": ".changes/template/979-981.json",
"chars": 94,
"preview": "{\n \"description\": \"this has 2 PRs associated.\",\n \"issues\": [441],\n \"type\": \"added\"\n}\n"
},
{
"path": ".changes/template/CHANGELOG.md",
"chars": 14429,
"preview": "# Change Log\n\nThis is a template changelog. This represents an older state of this repository, used to test parsing/form"
},
{
"path": ".changes/template/issue440.json",
"chars": 85,
"preview": "{\n \"description\": \"no associated PR.\",\n \"issues\": [440],\n \"type\": \"fixed\"\n}\n"
},
{
"path": ".editorconfig",
"chars": 364,
"preview": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\n\n[*.{rs,py,sh,md,toml,yml,js}]\ncharset = utf-8\n\n[*.{rs,py,"
},
{
"path": ".gitattributes",
"chars": 62,
"preview": "* text=auto\n\nDockerfile.* linguist-language=Dockerfile eol=lf\n"
},
{
"path": ".github/CODEOWNERS",
"chars": 24,
"preview": "* @cross-rs/maintainers\n"
},
{
"path": ".github/ISSUE_TEMPLATE/a_blank_issue.md",
"chars": 55,
"preview": "---\nname: Blank Issue\nabout: Create a blank issue.\n---\n"
},
{
"path": ".github/ISSUE_TEMPLATE/b_issue_report.yml",
"chars": 4738,
"preview": "name: Issue report\ndescription: Report something that is broken, missing or wrong.\n\nbody:\n - type: checkboxes\n id: a"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 422,
"preview": "blank_issues_enabled: true\ncontact_links:\n - name: Question?\n url: https://matrix.to/#/#cross-rs:matrix.org\n abou"
},
{
"path": ".github/ISSUE_TEMPLATE/z_feature_request.yml",
"chars": 1491,
"preview": "name: Feature Request\ndescription: Leave a feature request if you have a suggestion to improve cross and/or the rust eco"
},
{
"path": ".github/actions/cargo-install-upload-artifacts/action.yml",
"chars": 2378,
"preview": "name: Upload cargo install artifacts\ndescription: Upload `cargo install` artifacts\ninputs:\n target:\n description: 'T"
},
{
"path": ".github/actions/cargo-llvm-cov/action.yml",
"chars": 2540,
"preview": "name: llvm coverage\ndescription: Sets up everything that is needed for coverage. Makes artifacts available for processin"
},
{
"path": ".github/actions/cargo-publish/action.yml",
"chars": 2222,
"preview": "name: Publish crate\ndescription: Publish crate on crates.io and create release on github\ninputs:\n cargo-registry-token:"
},
{
"path": ".github/actions/post/action.yml",
"chars": 377,
"preview": "# adapted from https://github.com/actions/runner/issues/1478\nname: With post step\ndescription: 'Generic JS Action to exe"
},
{
"path": ".github/actions/post/main.js",
"chars": 660,
"preview": "// adapted from https://github.com/actions/runner/issues/1478\nconst { exec } = require(\"child_process\");\n\nfunction run(c"
},
{
"path": ".github/actions/setup-rust/action.yml",
"chars": 710,
"preview": "name: Setup Rust\ndescription: Setup Rust with specified toolchain, target and components.\ninputs:\n toolchain:\n descr"
},
{
"path": ".github/actions/setup-rust/rust.json",
"chars": 583,
"preview": "{\n \"problemMatcher\": [\n {\n \"owner\": \"rust\",\n \"pattern\": [\n {\n \"regexp\": \"^(warning|warn|er"
},
{
"path": ".github/bors.toml",
"chars": 154,
"preview": "block_labels = [\"needs-decision\"]\ndelete_merged_branches = true\nrequired_approvals = 0\nuse_codeowners = false\nstatus = ["
},
{
"path": ".github/codecov.yml",
"chars": 291,
"preview": "comment: false\ncodecov:\n branch: main\ncoverage:\n status:\n project:\n default:\n informational: true\n p"
},
{
"path": ".github/dependabot.yml",
"chars": 1127,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n "
},
{
"path": ".github/workflows/changelog.yml.x",
"chars": 1177,
"preview": "on:\n pull_request:\n types: [labeled, unlabeled, opened, synchronize, reopened]\n\nname: Changelog check\n\njobs:\n chang"
},
{
"path": ".github/workflows/ci.yml",
"chars": 14875,
"preview": "on:\n workflow_call:\n inputs:\n matrix-args:\n required: false\n type: string\n description: Ar"
},
{
"path": ".github/workflows/try.yml",
"chars": 4177,
"preview": "name: Try\non:\n issue_comment:\n types: [created]\njobs:\n acknowledge:\n runs-on: ubuntu-latest\n if: github.event"
},
{
"path": ".github/workflows/weekly.yml",
"chars": 881,
"preview": "on:\n schedule:\n - cron: '0 0 * * 5'\n workflow_dispatch:\n inputs:\n targets:\n required: false\n "
},
{
"path": ".gitignore",
"chars": 643,
"preview": "**/target/\n**/.idea/\n**/.vscode/*.*\n**/*.log\n/cargo-timing*.html\nCHANGELOG.md.draft\n\n# python stuff\n__pycache__/\n.pytest"
},
{
"path": ".gitmodules",
"chars": 126,
"preview": "[submodule \"docker/cross-toolchains\"]\n\tpath = docker/cross-toolchains\n\turl = https://github.com/cross-rs/cross-toolchain"
},
{
"path": "CHANGELOG.md",
"chars": 15503,
"preview": "# Change Log\n\nAll notable changes to this project will be documented in this file. This is an automatically-generated do"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 4474,
"preview": "# The Rust Code of Conduct\n\n## Conduct\n\n* We are committed to providing a friendly, safe and welcoming environment for a"
},
{
"path": "CONTRIBUTING.md",
"chars": 970,
"preview": "Thank you for looking to contribute to cross. Have a new feature you'd like to add? Know how to fix an open bug? Want to"
},
{
"path": "Cargo.toml",
"chars": 2548,
"preview": "[package]\nbuild = \"src/build.rs\"\ndescription = \"Zero setup cross compilation and cross testing\"\ndocumentation = \"https:/"
},
{
"path": "LICENSE-APACHE",
"chars": 9723,
"preview": " Apache License\n Version 2.0, January 2004\n http"
},
{
"path": "LICENSE-MIT",
"chars": 1108,
"preview": "Copyright (c) 2017-2022 by the respective authors\nCopyright (c) 2016 Jorge Aparicio\n\nPermission is hereby granted, free "
},
{
"path": "README.md",
"chars": 16146,
"preview": "[](https://crates.io/crates/cross)\n[\nci_dir=$(realpath \"${ci_dir}\")\nPROJECT_HOME=$(dirname \"${ci_d"
},
{
"path": "ci/test-bisect.sh",
"chars": 1210,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC1091,SC1090\n\n# test to see that custom toolchains work\n\nset -x\nset -eo pipefa"
},
{
"path": "ci/test-cross-image.sh",
"chars": 1459,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC2086,SC1091,SC1090\n\nset -x\nset -eo pipefail\n\nif [[ -z \"${TARGET}\" ]]; then\n "
},
{
"path": "ci/test-docker-in-docker.sh",
"chars": 2138,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC1004,SC1091,SC1090\n\n# test to see that running docker-in-docker works\n\nset -x"
},
{
"path": "ci/test-foreign-toolchain.sh",
"chars": 1946,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC1091,SC1090\n\n# test to see that foreign toolchains work\n\nset -x\nset -eo pipef"
},
{
"path": "ci/test-podman.sh",
"chars": 861,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC1091,SC1090\n\n# test to see that running and building images with podman works"
},
{
"path": "ci/test-remote.sh",
"chars": 1303,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC1091,SC1090\n\n# test to see that remote docker support works.\n\nset -x\nset -eo "
},
{
"path": "ci/test-zig-image.sh",
"chars": 1446,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC2086,SC1091,SC1090\n\nset -x\nset -eo pipefail\n\n# NOTE: \"${@}\" is an unbound var"
},
{
"path": "ci/test.sh",
"chars": 9458,
"preview": "#!/usr/bin/env bash\n# shellcheck disable=SC2086,SC1091,SC1090\n\nset -x\nset -eo pipefail\n\n# NOTE: \"${@}\" is an unbound var"
},
{
"path": "clippy.toml",
"chars": 215,
"preview": "disallowed-methods = [\n { path = \"std::path::Path::display\", reason = \"incorrect handling of non-Unicode paths, use p"
},
{
"path": "crosstool-ng/arm-unknown-linux-gnueabihf.config.in",
"chars": 376,
"preview": "CT_CONFIG_VERSION=\"4\"\nCT_PREFIX_DIR=\"/x-tools/${CT_TARGET}\"\nCT_DOWNLOAD_AGENT_CURL=y\nCT_ARCH_ARM=y\nCT_ARCH_ARCH=\"armv6\"\n"
},
{
"path": "crosstool-ng/loongarch64-unknown-linux-gnu.config.in",
"chars": 304,
"preview": "CT_CONFIG_VERSION=\"4\"\nCT_EXPERIMENTAL=y\nCT_PREFIX_DIR=\"/x-tools/${CT_TARGET}\"\nCT_ARCH_LOONGARCH=y\n# CT_DEMULTILIB is not"
},
{
"path": "crosstool-ng/loongarch64-unknown-linux-musl.config.in",
"chars": 307,
"preview": "CT_CONFIG_VERSION=\"4\"\nCT_EXPERIMENTAL=y\nCT_PREFIX_DIR=\"/x-tools/${CT_TARGET}\"\nCT_ARCH_LOONGARCH=y\n# CT_DEMULTILIB is not"
},
{
"path": "deny.toml",
"chars": 902,
"preview": "[graph]\n# only check for the targets we currently publish\ntargets = [\n { triple = \"x86_64-apple-darwin\" },\n { triple ="
},
{
"path": "docker/.dockerignore",
"chars": 181,
"preview": "# don't copy any of the python artifacts to the docker context\n__pycache__/\n.pytest_cache/\n*.py[cod]\n*$py.class\n**/*.egg"
},
{
"path": "docker/.gitattributes",
"chars": 14,
"preview": "* text eol=lf\n"
},
{
"path": "docker/Dockerfile.aarch64-linux-android",
"chars": 2606,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.aarch64-unknown-freebsd",
"chars": 1339,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.aarch64-unknown-linux-gnu",
"chars": 1762,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.aarch64-unknown-linux-gnu.centos",
"chars": 1836,
"preview": "FROM ubuntu:20.04 AS base\n\nCOPY lib.sh /\nCOPY linux-image.sh /\nRUN /linux-image.sh aarch64\n\nFROM centos:7\n\n# From https:"
},
{
"path": "docker/Dockerfile.aarch64-unknown-linux-musl",
"chars": 1578,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.aarch64_be-unknown-linux-gnu",
"chars": 1567,
"preview": "FROM ubuntu:24.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.arm-linux-androideabi",
"chars": 2650,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.arm-unknown-linux-gnueabi",
"chars": 1687,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.arm-unknown-linux-gnueabihf",
"chars": 1757,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.arm-unknown-linux-musleabi",
"chars": 1622,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.arm-unknown-linux-musleabihf",
"chars": 1678,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv5te-unknown-linux-gnueabi",
"chars": 1750,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv5te-unknown-linux-musleabi",
"chars": 1701,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv7-linux-androideabi",
"chars": 2686,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv7-unknown-linux-gnueabi",
"chars": 1537,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv7-unknown-linux-gnueabihf",
"chars": 1823,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv7-unknown-linux-musleabi",
"chars": 1661,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.armv7-unknown-linux-musleabihf",
"chars": 1700,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.asmjs-unknown-emscripten",
"chars": 643,
"preview": "FROM emscripten/emsdk:3.1.14\nWORKDIR /\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY "
},
{
"path": "docker/Dockerfile.cross",
"chars": 659,
"preview": "FROM ubuntu:20.04 AS rust\nENV DEBIAN_FRONTEND=noninteractive\nCOPY docker/lib.sh docker/cross.sh /\nCOPY ./ /project\nRUN /"
},
{
"path": "docker/Dockerfile.i586-unknown-linux-gnu",
"chars": 1632,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.i586-unknown-linux-musl",
"chars": 1437,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.i686-linux-android",
"chars": 3033,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.i686-pc-windows-gnu",
"chars": 2156,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.i686-unknown-freebsd",
"chars": 1307,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.i686-unknown-linux-gnu",
"chars": 1725,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.i686-unknown-linux-musl",
"chars": 1434,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.loongarch64-unknown-linux-gnu",
"chars": 1714,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.loongarch64-unknown-linux-musl",
"chars": 1811,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mips-unknown-linux-gnu",
"chars": 1472,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mips-unknown-linux-musl",
"chars": 1692,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mips64-unknown-linux-gnuabi64",
"chars": 1714,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mips64-unknown-linux-muslabi64",
"chars": 2081,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mips64el-unknown-linux-gnuabi64",
"chars": 1848,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mips64el-unknown-linux-muslabi64",
"chars": 2109,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mipsel-unknown-linux-gnu",
"chars": 1745,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.mipsel-unknown-linux-musl",
"chars": 1720,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.native",
"chars": 902,
"preview": "# This dockerfile is used when the target matches the images platform in `build-docker-image`\nFROM ubuntu:20.04 AS cross"
},
{
"path": "docker/Dockerfile.native.centos",
"chars": 1387,
"preview": "FROM ubuntu:20.04 AS base\nENV DEBIAN_FRONTEND=noninteractive\n\nARG TARGETARCH\nARG TARGETVARIANT\nARG CROSS_TARGET_TRIPLE\n\n"
},
{
"path": "docker/Dockerfile.powerpc-unknown-linux-gnu",
"chars": 1758,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.powerpc64-unknown-linux-gnu",
"chars": 1793,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.powerpc64le-unknown-linux-gnu",
"chars": 1831,
"preview": "FROM ubuntu:20.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
},
{
"path": "docker/Dockerfile.riscv64gc-unknown-linux-gnu",
"chars": 1812,
"preview": "FROM ubuntu:22.04 AS cross-base\nENV DEBIAN_FRONTEND=noninteractive\n\nCOPY common.sh lib.sh /\nRUN /common.sh\n\nCOPY cmake.s"
}
]
// ... and 161 more files (download for full content)
About this extraction
This page contains the full source code of the cross-rs/cross GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 361 files (1016.6 KB), approximately 285.0k tokens, and a symbol index with 1228 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.