Skip to content

Commit 4c929c9

Browse files
committed
fix: convert rules_rust_patched from submodule to regular files
- Remove submodule entry and add files directly to repository - Add .bazelversion file to ensure Bazel compatibility - Fixes CI error about missing MODULE.bazel in submodule path - Enables wasm32-wasip2 support with patched rules_rust
1 parent 30f4b9c commit 4c929c9

File tree

3,423 files changed

+758302
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,423 files changed

+758302
-1
lines changed

third_party/rules_rust_patched

Lines changed: 0 additions & 1 deletion
This file was deleted.

third_party/rules_rust_patched/.bazelci/presubmit.yml

Lines changed: 1113 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.direnv
2+
bzlmod
3+
crate_universe/private/bootstrap
4+
docs
5+
examples
6+
extensions
7+
test/integration
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
###############################################################################
2+
## Bazel Configuration Flags
3+
##
4+
## `.bazelrc` is a Bazel configuration file.
5+
## https://bazel.build/docs/best-practices#bazelrc-file
6+
###############################################################################
7+
8+
# Skip building runfiles links for faster builds.
9+
build --nobuild_runfile_links
10+
11+
# https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config
12+
common --enable_platform_specific_config
13+
14+
# Enable the only currently supported report type
15+
# https://bazel.build/reference/command-line-reference#flag--combined_report
16+
coverage --combined_report=lcov
17+
18+
# Avoid fully cached builds reporting no coverage and failing CI
19+
# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs
20+
coverage --experimental_fetch_all_coverage_outputs
21+
22+
# Required for some of the tests
23+
# https://bazel.build/reference/command-line-reference#flag--experimental_cc_shared_library
24+
common --experimental_cc_shared_library
25+
26+
###############################################################################
27+
## Unique configuration groups
28+
###############################################################################
29+
30+
# Enable use of the nightly toolchains.
31+
build:nightly --//rust/toolchain/channel=nightly
32+
33+
# Enable rustfmt for all targets in the workspace
34+
build:rustfmt --aspects=//rust:defs.bzl%rustfmt_aspect
35+
build:rustfmt --output_groups=+rustfmt_checks
36+
37+
# Enable clippy for all targets in the workspace
38+
build:clippy --aspects=//rust:defs.bzl%rust_clippy_aspect
39+
build:clippy --output_groups=+clippy_checks
40+
41+
# Enable unpretty for all targets in the workspace
42+
build:unpretty --aspects=//rust:defs.bzl%rust_unpretty_aspect
43+
build:unpretty --output_groups=+rust_unpretty
44+
45+
# `unpretty` requires the nightly toolchain. See tracking issue:
46+
# https://github.com/rust-lang/rust/issues/43364
47+
build:unpretty --config=nightly
48+
49+
###############################################################################
50+
## Incompatibility flags
51+
###############################################################################
52+
53+
# https://github.com/bazelbuild/bazel/issues/8195
54+
build --incompatible_disallow_empty_glob=true
55+
56+
# https://github.com/bazelbuild/bazel/issues/12821
57+
build --nolegacy_external_runfiles
58+
59+
# Required for cargo_build_script support before Bazel 7
60+
build --incompatible_merge_fixed_and_default_shell_env
61+
62+
# https://github.com/bazelbuild/bazel/issues/23043.
63+
build --incompatible_autoload_externally=
64+
65+
###############################################################################
66+
## Bzlmod
67+
###############################################################################
68+
69+
# A configuration for disabling bzlmod.
70+
common:no-bzlmod --noenable_bzlmod --enable_workspace
71+
72+
# Disable the bzlmod lockfile, so we don't accidentally commit MODULE.bazel.lock
73+
common --lockfile_mode=off
74+
75+
###############################################################################
76+
## Custom user flags
77+
##
78+
## This should always be the last thing in the `.bazelrc` file to ensure
79+
## consistent behavior when setting flags in that file as `.bazelrc` files are
80+
## evaluated top to bottom.
81+
###############################################################################
82+
83+
try-import %workspace%/user.bazelrc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.3.1
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Bazel Central Registry
2+
3+
When the ruleset is released, we want it to be published to the
4+
Bazel Central Registry automatically:
5+
<https://registry.bazel.build>
6+
7+
This folder contains configuration files to automate the publish step.
8+
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
9+
for authoritative documentation about these files.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fixedReleaser:
2+
login: scentini
3+
4+
moduleRoots:
5+
- "."
6+
- "extensions/bindgen"
7+
- "extensions/mdbook"
8+
- "extensions/prost"
9+
- "extensions/protobuf"
10+
- "extensions/wasm_bindgen"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"homepage": "https://github.com/bazelbuild/rules_rust",
3+
"maintainers": [
4+
{
5+
"email": "[email protected]",
6+
"github": "UebelAndre",
7+
"name": "UebelAndre"
8+
},
9+
{
10+
"email": "[email protected]",
11+
"github": "illicitonion",
12+
"name": "Daniel Wagner-Hall"
13+
},
14+
{
15+
"email": "[email protected]",
16+
"github": "scentini",
17+
"name": "Rosica Dejanovska"
18+
}
19+
],
20+
"repository": ["github:bazelbuild/rules_rust"],
21+
"versions": [],
22+
"yanked_versions": {}
23+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bcr_test_module:
2+
module_path: ""
3+
matrix:
4+
platform:
5+
- "macos_arm64"
6+
- "ubuntu2004"
7+
# # TODO: https://github.com/bazelbuild/rules_rust/issues/2009
8+
# - "windows"
9+
bazel: ["7.x", "8.x"]
10+
tasks:
11+
run_tests:
12+
name: "Run test module"
13+
platform: ${{ platform }}
14+
bazel: ${{ bazel }}
15+
test_targets:
16+
- "//..."
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "**leave this alone**",
3+
"strip_prefix": "extensions/bindgen",
4+
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.tar.gz"
5+
}

0 commit comments

Comments
 (0)