-
Notifications
You must be signed in to change notification settings - Fork 448
Comparing changes
Open a pull request
base repository: bazelbuild/rules_rust
base: 0.56.0
head repository: bazelbuild/rules_rust
compare: 0.57.0
Commits on Dec 17, 2024
-
Added documentation for all rules_rust settings (#3114)
There is no way to document symbols in a BUILD file or anything that is not a rule, macro, aspect, or provider. So to be able to generate documentation for settings, I've added `settings.bzl` files which contain macros with docstrings to do the trick.
Configuration menu - View commit details
-
Copy full SHA for eb1fe7d - Browse repository at this point
Copy the full SHA eb1fe7dView commit details -
Add test for editing patch Cargo.toml files (#3063)
This tests that the repository rules are properly invalidated when patched Cargo.toml files are edited.
Configuration menu - View commit details
-
Copy full SHA for f9a060d - Browse repository at this point
Copy the full SHA f9a060dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 717d160 - Browse repository at this point
Copy the full SHA 717d160View commit details -
Remove the unused implicit attribute
_cc_toolchains
. (#3116)CC toolchains are gathered from the line: ``` toolchains = use_cc_toolchains(), ``` Keep toolchain usage of _cc_toolchain with a TODO to remove it. See #3115 for details.
Configuration menu - View commit details
-
Copy full SHA for 1bfd1da - Browse repository at this point
Copy the full SHA 1bfd1daView commit details -
Configuration menu - View commit details
-
Copy full SHA for d832c6c - Browse repository at this point
Copy the full SHA d832c6cView commit details -
Remove crosstool files (#3118)
Remove `toolchain.crosstool_files and _cc_toolchains`. Fixes #3115.
Configuration menu - View commit details
-
Copy full SHA for 0e2fbbf - Browse repository at this point
Copy the full SHA 0e2fbbfView commit details
Commits on Dec 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 89aec55 - Browse repository at this point
Copy the full SHA 89aec55View commit details
Commits on Dec 29, 2024
-
Look up CARGO_BAZEL_GENERATOR_PATH correctly (#2088)
The intent is to allow this variable to be passed in an --action_env, but ctx.var is not where these show up: ctx.configuration.default_shell_env is.
Configuration menu - View commit details
-
Copy full SHA for 22d40b8 - Browse repository at this point
Copy the full SHA 22d40b8View commit details -
Added render_config and splicing_config to create_universe bzlmod (#3136
Configuration menu - View commit details
-
Copy full SHA for 0e6ea40 - Browse repository at this point
Copy the full SHA 0e6ea40View commit details -
Configuration menu - View commit details
-
Copy full SHA for 088209e - Browse repository at this point
Copy the full SHA 088209eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ee7d299 - Browse repository at this point
Copy the full SHA ee7d299View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3dedbef - Browse repository at this point
Copy the full SHA 3dedbefView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce8d20b - Browse repository at this point
Copy the full SHA ce8d20bView commit details -
fix: add 'manual' option for
//rust/settings/lto
(#3120)Related to #3119 Adds an option named "manual" to `//rust/settings/lto` which was introduced in #3104. When set to "manual" we will not automatically set any flags so users with customized setups can configure the relevant flags on their own. FWIW this was an oversight and IMO should have been included in the original PR. Apologies to anyone who stumbled over this or encountered build issues!
Configuration menu - View commit details
-
Copy full SHA for 55ef2b8 - Browse repository at this point
Copy the full SHA 55ef2b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 51ff049 - Browse repository at this point
Copy the full SHA 51ff049View commit details -
Configuration menu - View commit details
-
Copy full SHA for a29089b - Browse repository at this point
Copy the full SHA a29089bView commit details -
workspace: Pay attention to members (#3102)
Previously we were ignoring this field and always doing auto-discovery. Cargo only does auto-discovery if this field is not set. Fixes #3090
Configuration menu - View commit details
-
Copy full SHA for 4960125 - Browse repository at this point
Copy the full SHA 4960125View commit details -
Ignore symlinks in workspace discovery (#3142)
There are edge-cases around bazel output symlinks which are fiddly to cover, and I wouldn't expect people to have symlinks between crates within their local workspace. If they do, they can use the explicit `members` property of the Cargo.toml workspace to explicitly include it.
Configuration menu - View commit details
-
Copy full SHA for c06feef - Browse repository at this point
Copy the full SHA c06feefView commit details
Commits on Dec 30, 2024
-
We were accidentally warning on all of the paths to track, where we should only be warning on the _external_ paths to track.
Configuration menu - View commit details
-
Copy full SHA for cdfb735 - Browse repository at this point
Copy the full SHA cdfb735View commit details
Commits on Dec 31, 2024
-
Updated crates_vendor rule to accurately use runfiles (#3146)
This is most impactful for windows environments that do not support runfiles (symlinks) at all.
Configuration menu - View commit details
-
Copy full SHA for 37acfa1 - Browse repository at this point
Copy the full SHA 37acfa1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3b890d - Browse repository at this point
Copy the full SHA d3b890dView commit details
Commits on Jan 2, 2025
-
Remove rules_foreign_cc example (#3151)
This has been moved to `rules_foreign_cc` bazel-contrib/rules_foreign_cc#1354
Configuration menu - View commit details
-
Copy full SHA for 4f339e7 - Browse repository at this point
Copy the full SHA 4f339e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0fe933 - Browse repository at this point
Copy the full SHA c0fe933View commit details -
Make lto toolchain options public and don't link proc-macros with LTO (…
…#3147) I would like to make lto setting public in toolchain so that when we are providing custom toolchains it would be easier to make configurations for LTO with `select` statements. The logic which determines the flags based on cargo outputs. Proc-macro crates can not be linked with lto and we should not emit bitcode either. This fixes #3143 --------- Co-authored-by: Daniel Wagner-Hall <dwagnerhall@apple.com>
Configuration menu - View commit details
-
Copy full SHA for 568bb7b - Browse repository at this point
Copy the full SHA 568bb7bView commit details
Commits on Jan 3, 2025
-
Update hello_comp_opt example with new LTO settings (#3155)
Fixes comment mentioned in [3143#issuecomment-2568947858](#3143 (comment)) --------- Co-authored-by: UebelAndre <github@uebelandre.com>
Configuration menu - View commit details
-
Copy full SHA for b9f51f5 - Browse repository at this point
Copy the full SHA b9f51f5View commit details -
Replace symlinks in the output of cargo build scripts (#3067)
#2948 breaks building of rdkafka with `cmake` because of dangling symlinks. When building with latest version we get the following error: ``` ERROR: /home/wincent/.cache/bazel/_bazel_wincent/394c4c1d21c5490d4a70260a2cfccaf5/external/rules_rust~~crate~crates__rdkafka-sys-4.8.0-2.3.0/BUILD.bazel:68:19: error while validating output tree artifact external/rules_rust~~crate~crates__rdkafka-sys-4.8.0-2.3.0/_bs.out_dir: child lib/cmake/RdKafka/FindLZ4.cmake is a dangling symbolic link ERROR: /home/wincent/.cache/bazel/_bazel_wincent/394c4c1d21c5490d4a70260a2cfccaf5/external/rules_rust~~crate~crates__rdkafka-sys-4.8.0-2.3.0/BUILD.bazel:68:19: Running Cargo build script rdkafka-sys failed: not all outputs were created or valid Target @@rules_rust~~crate~crates__rdkafka-0.37.0//:rdkafka failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /home/wincent/.cache/bazel/_bazel_wincent/394c4c1d21c5490d4a70260a2cfccaf5/external/rules_rust~~crate~crates__rdkafka-sys-4.8.0-2.3.0/BUILD.bazel:18:13 Compiling Rust rlib rdkafka_sys v4.8.0+2.3.0 (7 files) failed: not all outputs were created or valid ```
Configuration menu - View commit details
-
Copy full SHA for 1d0fe8a - Browse repository at this point
Copy the full SHA 1d0fe8aView commit details
Commits on Jan 8, 2025
-
Updated crate_universe bzlmod to support skipping splicing (#3148)
Additional Changes: - Updated crate_universe macros to refer to aliases instead of direct external target for bzlmod support. - Added `rust_host_tools_nightly` module for exposing a nightly toolchain - Converted `examples/crate_universe` to use bzlmod
Configuration menu - View commit details
-
Copy full SHA for 5e90483 - Browse repository at this point
Copy the full SHA 5e90483View commit details -
Fixed crate_universe examples not vendoring consistent crate versions (…
Configuration menu - View commit details
-
Copy full SHA for b9d8426 - Browse repository at this point
Copy the full SHA b9d8426View commit details -
feat: Add
rust_lint_group
andcargo_lints
rule to define lint gro……ups (#2993) Chatted about this previously in [Slack](https://bazelbuild.slack.com/archives/CSV56UT0F/p1718030356910019). The goal with this PR is to make it easier to define and share lint configurations for your build. ### Description The PR adds two new rules, `rust_lint_group` and `cargo_lints`. It also adds a "lints" attr to `rust_library` and `rust_binary` rules that expects a new `LintsInfo` provider. * `rust_lint_group` allows you to define Rust, Clippy, and Rustdoc lints in a `BUILD` file. * `cargo_lints` automatically generates a set of lints by reading a crate's `Cargo.toml`, and optionally the workspace's Cargo.toml for workspace inheritance. Then the rustc, clippy, and rustdoc actions are all updated to check for the `LintsInfo` provider and appends the correct arguments so the lints take effect. ### Design Honestly this is my first large change to a set of Bazel rules, so I definitely could have done something wrong here! The change is split into two commits, the first introduces `rust_lint_group` which IMO is relatively straight forward. Some attributes are defined on a rule which are then formatted into command line flags and passed around with a provider. The second commit adds `cargo_lints` and is much larger, a few things worth considering: * I was back and forth a bit on using a `repository_rule` or a regular `rule`. While the `repository_rule` maps well to a Cargo Workspace and you'd only need to define it once, not everyone uses workspaces and so I figured a regular `rule` was more general. * Parsing a `Cargo.toml` is done via a new Rust binary called `cargo_toml_info`. I tried to keep the external dependencies on this binary to a minimum, it only has one at the moment which is [`cargo_toml`](https://docs.rs/cargo_toml/latest/cargo_toml/) and I based this change largely off of #2772. I tried to make the tool general though so other Cargo metadata rules could use it in the future. ### Tests There aren't any! I wasn't sure where the best place to start was, any guidance here is appreciated!
Configuration menu - View commit details
-
Copy full SHA for 3d63631 - Browse repository at this point
Copy the full SHA 3d63631View commit details -
Generate docs from source. (#3152)
No more needing to manually run a script to render source into the repo. This process was ultimately made super slow by needing to compile protobuf to build stardoc.
Configuration menu - View commit details
-
Copy full SHA for 2435cae - Browse repository at this point
Copy the full SHA 2435caeView commit details -
Configuration menu - View commit details
-
Copy full SHA for b53f9a8 - Browse repository at this point
Copy the full SHA b53f9a8View commit details -
Added
cargo_manifest_dir
submodule tocargo_build_script_runner
. (#……3161) This change aims to isolate some of the newer, more complicated parts of `cargo_build_script_runner`.
Configuration menu - View commit details
-
Copy full SHA for b6c9468 - Browse repository at this point
Copy the full SHA b6c9468View commit details -
Configuration menu - View commit details
-
Copy full SHA for f329c0c - Browse repository at this point
Copy the full SHA f329c0cView commit details
Commits on Jan 9, 2025
-
Configuration menu - View commit details
-
Copy full SHA for dfcf422 - Browse repository at this point
Copy the full SHA dfcf422View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5367387 - Browse repository at this point
Copy the full SHA 5367387View commit details -
Run
bazel mod tidy
after vendoring crate_universe outputs (#3177)`bazel mod tidy` will now run at the end of any `crates_vendor` executions if the current workspace contains a `MODULE.bazel` file and the current Bazel version is greater than `7.0.0`. closes #2368
Configuration menu - View commit details
-
Copy full SHA for f86e01b - Browse repository at this point
Copy the full SHA f86e01bView commit details
Commits on Jan 10, 2025
-
Add support for UEFI targets and OS (#2142)
Requires bazelbuild/platforms#76 --------- Co-authored-by: Tim Windelschmidt <tim@monogon.tech>
Configuration menu - View commit details
-
Copy full SHA for c241ed0 - Browse repository at this point
Copy the full SHA c241ed0View commit details -
Add documentation about using binary dependencies in crate_universe (#…
…3183) I spent a bit of time with it on how to use it properly as the documentation was not too explicit to me. So I thought I write it down.
Configuration menu - View commit details
-
Copy full SHA for 5e426fa - Browse repository at this point
Copy the full SHA 5e426faView commit details
Commits on Jan 13, 2025
-
Improve handling of compile_data with mixed sources (#3176)
I'm not very well versed in starlark nor the rules_rust codebase, so feel free to ignore this and address the issue in a more fitting way, but this fixes #3171 and a related issue for me.
Configuration menu - View commit details
-
Copy full SHA for bb74a65 - Browse repository at this point
Copy the full SHA bb74a65View commit details
Commits on Jan 20, 2025
-
Configuration menu - View commit details
-
Copy full SHA for ab3572e - Browse repository at this point
Copy the full SHA ab3572eView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc29194 - Browse repository at this point
Copy the full SHA dc29194View commit details -
Delete rules_nodejs rules from wasm_bindgen (#3153)
`bazel_build_rules_nodejs` has long since been deprecated. Users who still need to use these rules can pin `rules_rust_wasm_bindgen` to `0.56.0`.
Configuration menu - View commit details
-
Copy full SHA for 8dcd68d - Browse repository at this point
Copy the full SHA 8dcd68dView commit details -
Configuration menu - View commit details
-
Copy full SHA for af70b2a - Browse repository at this point
Copy the full SHA af70b2aView commit details -
Fix toolchain repo aliases and add a test. (#3181)
Co-authored-by: UebelAndre <github@uebelandre.com>
Configuration menu - View commit details
-
Copy full SHA for aae84e9 - Browse repository at this point
Copy the full SHA aae84e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 281d270 - Browse repository at this point
Copy the full SHA 281d270View commit details -
Don't register rust_host_tools twice (#3188)
The bazel-lsp uses `rust_host_tools` to perform some actions by using: ```starlark rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools") use_repo(rust_host_tools, "rust_host_tools") ``` See: https://github.com/cameron-martin/bazel-lsp/blob/19b799e528c884be6efeb108ed1840a4edff1330/MODULE.bazel#L14 It started failing when using rules_rust from HEAD after #3148 because rules_rust's MODULE.bazel registers toolchain with the same name: ```starlark rust_host_tools.host_tools( name = "rust_host_tools", ) ``` See: https://github.com/bazelbuild/rules_rust/blob/aae84e97c73eae2e6654e1a7e1b751d0c1f2ac9e/MODULE.bazel#L70
Configuration menu - View commit details
-
Copy full SHA for ff2dddb - Browse repository at this point
Copy the full SHA ff2dddbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f0ef6ed - Browse repository at this point
Copy the full SHA f0ef6edView commit details -
Configuration menu - View commit details
-
Copy full SHA for c075460 - Browse repository at this point
Copy the full SHA c075460View commit details
There are no files selected for viewing