Skip to content

Commit 2c8b1a5

Browse files
committed
Initial commit with basic support for remote docker.
This supports the volume-based structure, and uses some nice optimizations to ensure that only the desired toolchain and cargo items are copied over. It also uses drops to ensure scoped deletion of resources, to avoid complex logic ensuring their cleanup. It also supports persistent data volumes, through `cross-util`. In order to setup a persistent data volume, use: ```bash cross-util create-crate-volume --target arm-unknown-linux-gnueabihf ``` Make sure you provide your `DOCKER_HOST` or correct engine type to ensure these are being made on the remote host. Then, run your command as before: ```bash CROSS_REMOTE=true cross build --target arm-unknown-linux-gnueabihf ``` Finally, you can clean up the generated volume using: ```bash cross-util remove-crate-volume --target arm-unknown-linux-gnueabihf ``` A few other utilities are present in `cross-util`: - `list-volumes`: list all volumes created by cross. - `remove-volumes`: remove all volumes created by cross. - `prune-volumes`: prune all volumes unassociated with a container. - `list-containers`: list all active containers created by cross. - `remove-containers`: remove all active containers created by cross. The initial implementation was done by Marc Schreiber, https://github.com/schrieveslaach. Fixes #248. Fixes #273. Closes #449.
1 parent e1676d2 commit 2c8b1a5

9 files changed

+1426
-176
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
77

88
### Added
99

10+
- #785 - added support for remote container engines through data volumes. also adds in utility to commands to create and remove persistent data volumes.
1011
- #782 - added `build-std` config option, which builds the rust standard library from source if enabled.
1112
- #775 - forward Cargo exit code to host
1213
- #772 - added `CROSS_CONTAINER_OPTS` environment variable to replace `DOCKER_OPTS`.

Cargo.lock

+58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ serde = { version = "1", features = ["derive"] }
3131
serde_json = "1"
3232
serde_ignored = "0.1.2"
3333
shell-words = "1.1.0"
34+
walkdir = { version = "2", optional = true }
35+
sha1_smol = "1.0.0"
36+
tempfile = "3.3.0"
3437

3538
[target.'cfg(not(windows))'.dependencies]
3639
nix = { version = "0.24", default-features = false, features = ["user"] }

0 commit comments

Comments
 (0)