| Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago | 1 | # Reindeer configuration for the buck2 third-party Rust crates. |
| 2 | vendor = {} |
| 3 | |
| 4 | # Crates read CARGO_PKG_* at compile time; without this they fail to build. |
| 5 | cargo_env = true |
| 6 | |
| 7 | # Feature resolution runs once per platform. Naming any platform replaces |
| Give the third-party crates a platform to be Android on 0238622 nandi 19d ago | 8 | # reindeer's default list; these are the desktop hosts this repo ships for, |
| 9 | # plus the one device target. |
| Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago | 10 | [platform.linux-x86_64] |
| 11 | target = "x86_64-unknown-linux-gnu" |
| 12 | execution-platform = true |
| 13 | |
| 14 | [platform.linux-arm64] |
| 15 | target = "aarch64-unknown-linux-gnu" |
| 16 | execution-platform = true |
| 17 | |
| 18 | [platform.macos-x86_64] |
| 19 | target = "x86_64-apple-darwin" |
| 20 | execution-platform = true |
| 21 | |
| 22 | [platform.macos-arm64] |
| 23 | target = "aarch64-apple-darwin" |
| 24 | execution-platform = true |
| 25 | |
| Give the third-party crates a platform to be Android on 0238622 nandi 19d ago | 26 | # The phone. `execution-platform = false` is what makes it a target and only a |
| 27 | # target: a build script still compiles and runs on the host, so its own |
| 28 | # features are resolved against the host platform rather than unified into this |
| 29 | # one. Get that wrong and a host-only dependency follows a build script into the |
| 30 | # device graph. |
| 31 | [platform.android-arm64] |
| 32 | target = "aarch64-linux-android" |
| 33 | execution-platform = false |
| 34 | |
| Build under buck2, with the toolchain pinned rather than found 460541b nandi 19d ago | 35 | [buck] |
| 36 | file_name = "BUCK" |
| 37 | buckfile_imports = """ |
| 38 | load("@prelude//rust:cargo_package.bzl", "cargo") |
| 39 | load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run") |
| 40 | """ |
| 41 | rust_library = "cargo.rust_library" |
| 42 | rust_binary = "cargo.rust_binary" |