# Reindeer configuration for the buck2 third-party Rust crates. vendor = {} # Crates read CARGO_PKG_* at compile time; without this they fail to build. cargo_env = true # Feature resolution runs once per platform. Naming any platform replaces # reindeer's default list; these are the desktop hosts this repo ships for, # plus the one device target. [platform.linux-x86_64] target = "x86_64-unknown-linux-gnu" execution-platform = true [platform.linux-arm64] target = "aarch64-unknown-linux-gnu" execution-platform = true [platform.macos-x86_64] target = "x86_64-apple-darwin" execution-platform = true [platform.macos-arm64] target = "aarch64-apple-darwin" execution-platform = true # The phone. `execution-platform = false` is what makes it a target and only a # target: a build script still compiles and runs on the host, so its own # features are resolved against the host platform rather than unified into this # one. Get that wrong and a host-only dependency follows a build script into the # device graph. [platform.android-arm64] target = "aarch64-linux-android" execution-platform = false [buck] file_name = "BUCK" buckfile_imports = """ load("@prelude//rust:cargo_package.bzl", "cargo") load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run") """ rust_library = "cargo.rust_library" rust_binary = "cargo.rust_binary"