diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2019-11-01 15:46:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-01 15:46:47 +0000 |
commit | 56240d7f20a2cc4b931a89617c37403586dc5b74 (patch) | |
tree | e6ed3a95889bb58037d35525df1309aeaa3699ba /doc/languages-frameworks | |
parent | a8ebd0b0c05bcca2d870d6172d9387fc6dd1638e (diff) | |
parent | bb7184d6a62f3eefdadb069091f8985871279b15 (diff) |
Merge pull request #71899 from decentriq/aslemmer/build-rust-package-add-target
build-support/rust: Add target option
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/rust.section.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 31f1abd197b59..8b9aa5dc16853 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -68,6 +68,17 @@ build-time. When `verifyCargoDeps` is set to `true`, the build will also verify that the `cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future. +### Building a crate for a different target + +To build your crate with a different cargo `--target` simply specify the `target` attribute: + +```nix +pkgs.rustPlatform.buildRustPackage { + (...) + target = "x86_64-fortanix-unknown-sgx"; +} +``` + ## Compiling Rust crates using Nix instead of Cargo ### Simple operation |