Update example subdirectory to be a local repository#25
Merged
Conversation
Contributor
Author
|
The latest changes to the test/ package won't work properly until https://bazel-review.googlesource.com/c/7571/ is merged and released. |
Contributor
Author
|
I've added a fork of test_rules.bzl so that tests pass, we can remove it when released Bazel includes bazelbuild/bazel@b89f30e |
Member
|
Sounds good. Thanks, @katre. Is this ready for review now? |
Contributor
Author
|
Yes, with the fork of test_rules.bzl this is ready for review. When the fixed test_rules.bzl is released (next month, I guess?) I'll send another PR to remove it. |
Member
|
LGTM. Thanks! |
davidzchen
approved these changes
Dec 14, 2016
walter-zeromatter
added a commit
to walter-zeromatter/rules_rust
that referenced
this pull request
Jun 11, 2026
bazelbuild#25) rust_shared_library links the cc toolchain's C++ runtime (libstdc++/libc++ and the unwinder) dynamically, so it becomes an external DT_NEEDED on the produced shared library. When shipping a self-contained .so to a consumer that uses a different C++ stdlib, that dynamic dependency is undesirable. Add a `cc_runtime_linkage` attribute on rust_shared_library (dynamic|static, default dynamic so existing behavior is unchanged). When static, the C++ runtime is linked via cc_toolchain.static_runtime_lib so it is embedded in the shared library and no libstdc++/libc++/libunwind DT_NEEDED is emitted. get_cc_toolchain_runtime_libs gains a `linkage` parameter resolved from the attribute. Non-shared crate types are unchanged.
walter-zeromatter
added a commit
to ZeromatterOSS/rules_rust
that referenced
this pull request
Jun 24, 2026
bazelbuild#25) rust_shared_library links the cc toolchain's C++ runtime (libstdc++/libc++ and the unwinder) dynamically, so it becomes an external DT_NEEDED on the produced shared library. When shipping a self-contained .so to a consumer that uses a different C++ stdlib, that dynamic dependency is undesirable. Add a `cc_runtime_linkage` attribute on rust_shared_library (dynamic|static, default dynamic so existing behavior is unchanged). When static, the C++ runtime is linked via cc_toolchain.static_runtime_lib so it is embedded in the shared library and no libstdc++/libc++/libunwind DT_NEEDED is emitted. get_cc_toolchain_runtime_libs gains a `linkage` parameter resolved from the attribute. Non-shared crate types are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the examples slightly clearer by using a syntax that is closer to how end-users will use the rust rules, and helps to ensure that example rules can't be accidentally used from the main rust rules.