commit | bf0413086ef22bcbf54093c3377564f89ca65d2f | [log] [tgz] |
---|---|---|
author | James Leitch <me@rickvanprim.com> | Mon Dec 11 09:40:32 2023 -0800 |
committer | GitHub <noreply@github.com> | Mon Dec 11 17:40:32 2023 +0000 |
tree | a70f7af186c10889821f2ffa8f29f549a53cd965 | |
parent | 0a4c4dfb0dc3c81c7b541ea5f0910341fefceed2 [diff] |
NixOS added as a Platform target including a pseudo target triple (#2311) Happy to rework this if there's a better approach. Motivation is to get rid of this hack I've been using (including in the `nix_cross_compiling` example): ```bazel # This seems like the best way for the Cargo generated dependencies to be # aware of `x86_64-unknown-nixos-gnu`. selects.config_setting_group( name = "x86_64-unknown-linux-gnu", match_any = [ ":x86_64-unknown-linux-gnu_linux", ":x86_64-unknown-linux-gnu_nixos", ], ) config_setting( name = "x86_64-unknown-linux-gnu_linux", constraint_values = [ "@platforms//cpu:x86_64", "@platforms//os:linux", ], ) config_setting( name = "x86_64-unknown-linux-gnu_nixos", constraint_values = [ "@platforms//cpu:x86_64", "@platforms//os:nixos", ], ) ```
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust
.
Please refer to the full documentation.