-
Notifications
You must be signed in to change notification settings - Fork 592
Comparing changes
Open a pull request
base repository: bazelbuild/rules_rust
base: 0.42.1
head repository: bazelbuild/rules_rust
compare: 0.43.0
- 19 commits
- 251 files changed
- 10 contributors
Commits on Apr 22, 2024
-
Bzlmod-aware runfiles library (#2566)
This implements the repo_mapping capabilities and provides a new runfiles API. The new API can be accessed explicitly as `runfiles::Runfiles::rlocation_from` or with the `runfiles::rlocation!` macro, which adds compile-time support for correctly embedding the external repo. This is a purely new API, existing usage continues to work, although we mark it deprecated because it's not fully correct. We can remove it at some point in the future. This PR also transitions in-repo examples/tests to using it, in case anyone copies them. --------- Co-authored-by: scentini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8d074a0 - Browse repository at this point
Copy the full SHA 8d074a0View commit details
Commits on Apr 23, 2024
-
Add clippy_flag flag to allow flags to be added in succession. (#2625)
This helps keep my bazelrc cleaner since I can pass clippy flags on multiple lines with comments about why they're being added. Co-authored-by: Daniel Wagner-Hall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 72d1d4a - Browse repository at this point
Copy the full SHA 72d1d4aView commit details -
Add aspect_rules_js to MODULE.bazel (#2618)
Otherwise wasm_bindgen with rules_js is unusable.
Configuration menu - View commit details
-
Copy full SHA for df7a655 - Browse repository at this point
Copy the full SHA df7a655View commit details
Commits on Apr 24, 2024
-
Register a default rust toolchain. (#2624)
See bazelbuild/bazel#22024 for details.
Configuration menu - View commit details
-
Copy full SHA for 29ec07a - Browse repository at this point
Copy the full SHA 29ec07aView commit details -
Nit: Fix link to example in rust_bindgen.md (#2628)
Co-authored-by: Daniel Wagner-Hall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a2d1344 - Browse repository at this point
Copy the full SHA a2d1344View commit details -
Add context to error messages (#2408)
Co-authored-by: UebelAndre <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4c554fc - Browse repository at this point
Copy the full SHA 4c554fcView commit details
Commits on Apr 29, 2024
-
Update
cargo_bootstrap_repositoryinterface to match dependency mac……ros (#2630) This updates the bootstrap repository rule to use the same interface the dependency macros and crate_universe does: - https://github.com/bazelbuild/rules_rust/blob/0.42.1/rust/repositories.bzl#L157-L158 - https://github.com/bazelbuild/rules_rust/blob/0.42.1/crate_universe/private/crates_repository.bzl#L302-L305
Configuration menu - View commit details
-
Copy full SHA for 2776987 - Browse repository at this point
Copy the full SHA 2776987View commit details -
Added debug logging for spliced manifests to crate_universe (#2629)
This adds the following new logging when `CARGO_BAZEL_DEBUG=1` is enabled in the environment when the repository rule runs. ``` cd test/no_std && CARGO_BAZEL_REPIN=1 CARGO_BAZEL_DEBUG=1 bazel sync --only=no_std_crate_index ``` ```` ... ... Splice 2024-04-27T16:31:48.249675Z DEBUG write_registry_urls_and_feature_map: cargo_bazel::splicing::splicer: Writing Cargo manifest '/private/var/tmp/_bazel_user/427c86c43c8db37f50959419e7306f4e/external/no_std_crate_index/splicing-workspace/Cargo.toml': ```toml [dependencies.libc_alloc] version = "1.0.3" [lib] name = "direct_cargo_bazel_deps" path = ".direct_cargo_bazel_deps.rs" required-features = [] [package] edition = "2018" name = "direct-cargo-bazel-deps" version = "0.0.1" [workspace] members = [] resolver = "2" [workspace.metadata.cargo-bazel.features."direct-cargo-bazel-deps 0.0.1"] common = [] [workspace.metadata.cargo-bazel.features."direct-cargo-bazel-deps 0.0.1".selects] [workspace.metadata.cargo-bazel.features."libc_alloc 1.0.4"] common = [] [workspace.metadata.cargo-bazel.features."libc_alloc 1.0.4".selects] [workspace.metadata.cargo-bazel.package_prefixes] [workspace.metadata.cargo-bazel.sources."libc_alloc 1.0.4"] sha256 = "6a090348b66d90d8507e30f0d2bd88e5a5c454bd1733fc6d617cbc3471bf69ea" url = "https://static.crates.io/crates/libc_alloc/1.0.4/download" ``` ... ... ````
Configuration menu - View commit details
-
Copy full SHA for c43af7b - Browse repository at this point
Copy the full SHA c43af7bView commit details -
also rewrite -isystem in addition to -sysroot (#2631)
I build in a hermetic c++ toolchain and use `-isystem` args in addition to `-sysroot` which did not get rewritten before. this is one of the errors I get (indirect dependency when using `aspect_rules_py`): ``` cargo:warning=ToolExecError: Command "/tmp/bazel-working-directory/_main/external/local_config_cc/bin/clang" ... "-nostdinc" "-isystem" "external/local_config_cc/cxxlib/fastbuild/include/clang" "-isystem" "external/local_config_cc/cxxlib/fastbuild/include/x86_64-linux-gnu" "-isystem" "external/local_config_cc/cxxlib/fastbuild/include" "--sysroot=/tmp/bazel-working-directory/_main/external/local_config_cc/cxxlib/fastbuild" ... "-o" "/tmp/bazel-working-directory/_main/bazel-out/k8-fastbuild/bin/external/rules_rust~~crate~crate_index__bzip2-sys-0.1.11-1.0.8/bzip2-sys_bs.out_dir/lib/bzip2-1.0.8/decompress.o" "-c" "bzip2-1.0.8/decompress.c" cargo:warning=In file included from bzip2-1.0.8/decompress.c:22: cargo:warning=bzip2-1.0.8/bzlib_private.h:25:10: fatal error: 'stdlib.h' file not found cargo:warning=#include <stdlib.h> cargo:warning= ^~~~~~~~~~ cargo:warning=1 error generated. ``` I think it is unfortunate and probably brings more weird errors up in the future when the build command does not run in the same place where every other bazel rule runs the compiler.
Configuration menu - View commit details
-
Copy full SHA for 64920a0 - Browse repository at this point
Copy the full SHA 64920a0View commit details
Commits on Apr 30, 2024
-
Support loading http credentials from netrc (#2623)
Bazel's `http_archive` and `http_file` use `~/.netrc` file to load HTTP credentials. Now rules_rust use the same approach if no other authorization parameters are provided. NOTE: `http_archive` supports passing a custom `netrc` and `auth_patterns`. But this parameters are not added to the rust rules at the moment. --------- Co-authored-by: Daniel Wagner-Hall <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 78d920b - Browse repository at this point
Copy the full SHA 78d920bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fc0f8c - Browse repository at this point
Copy the full SHA 1fc0f8cView commit details
Commits on May 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0ca65fb - Browse repository at this point
Copy the full SHA 0ca65fbView commit details
Commits on May 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d6c5704 - Browse repository at this point
Copy the full SHA d6c5704View commit details
Commits on May 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3342d68 - Browse repository at this point
Copy the full SHA 3342d68View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd7a694 - Browse repository at this point
Copy the full SHA dd7a694View commit details
Commits on May 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 29aed66 - Browse repository at this point
Copy the full SHA 29aed66View commit details -
Use
cargo treeto determine feature dependent optional deps (#2636)The Cargo [Feature Resolver version 2](https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2) behavior is currently not supported by the `cargo metadata` sub command (rust-lang/cargo#9863) which `crate_universe` uses to determine the dependencies of a target, leading to inaccuracies when dependencies are introduced via feature resolution for a particular configuration. In #1710 functionality was added to use `cargo tree` to perform feature resolution for each supported platform. This change expands on this trick to collect dependency information at the same time and use that to determine whether or not to include optional dependencies located in standard `cargo metadata` output in the rendered Bazel targets. Non optional or `target.cfg` (conditional) dependencies behave as they did before this change. Implementation details: - `FeatureGenerator` was replaced by `TreeResolver` - Optional dependencies are now rendered as selects on explicit platforms. This will expand the size of `cargo-bazel-lock.json` files but is expected to be more correct.
Configuration menu - View commit details
-
Copy full SHA for f22926a - Browse repository at this point
Copy the full SHA f22926aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 56456cf - Browse repository at this point
Copy the full SHA 56456cfView commit details
Commits on May 9, 2024
-
Update cross to fix crate_universe builds in releases (#2645)
Configuration menu - View commit details
-
Copy full SHA for 5b0a6a9 - Browse repository at this point
Copy the full SHA 5b0a6a9View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 0.42.1...0.43.0