diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/snippets/rust-cross.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/snippets/rust-cross.md b/docs/markdown/snippets/rust-cross.md new file mode 100644 index 0000000..7f18c44 --- /dev/null +++ b/docs/markdown/snippets/rust-cross.md @@ -0,0 +1,16 @@ +## Rust cross-compilation + +Cross-compilation is now supported for Rust targets. Like other +cross-compilers, the Rust binary must be specified in your cross +file. It should specify a `--target` (as installed by `rustup target`) +and a custom linker pointing to your C cross-compiler. For example: + +``` +[binaries] +c = '/usr/bin/arm-linux-gnueabihf-gcc-7' +rust = [ + 'rustc', + '--target', 'arm-unknown-linux-gnueabihf', + '-C', 'linker=/usr/bin/arm-linux-gnueabihf-gcc-7', +] +``` |