Clarification of custom runners #1173
-
My intentions are to cross compile for a remote RaspberryPi board and with cargo I can simply specify a custom cargo runner that uploads the file and runs it over ssh. This even gets the output back on terminal. I'm trying to do the same with a cross runner but I cannot specify a custom file/script/binary. I get an error:
I could not find more info about these runners and what are their differences. Furthermore how would I go about calling a custom runner as specified in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Runners work the same for cross as with cargo, however you'd need to mount the executable so that it's visible in the docker container. So, instead of using the The only things that are mounted is the current directory, and the workspace directory, (e.g the folder with the lowest You can mount arbitrary folders with https://github.com/cross-rs/cross/wiki/Configuration#targettargetenv I do notice that you're using nushell as well, and that would mean that you'd have to install nushell in the docker image too or make the script work in bash (note that cargo is not included in the image at the [target.aarch64-unknown-linux-gnu.env]
passthrough = ["CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=./cargo-remote-runner"] |
Beta Was this translation helpful? Give feedback.
Runners work the same for cross as with cargo, however you'd need to mount the executable so that it's visible in the docker container. So, instead of using the
runner
option, useCARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER
directly.The only things that are mounted is the current directory, and the workspace directory, (e.g the folder with the lowest
Cargo.toml
)You can mount arbitrary folders with https://github.com/cross-rs/cross/wiki/Configuration#targettargetenv
I do notice that you're using nushell as well, and that would mean that you'd have to install nushell in the docker image too or make the script work in bash (note that cargo is not included in the image at the
pre-build
step…