Skip to content

Add rules_rs v0.0.27.envoy to bazel-registry with telemetry removal#3708

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-rules-rs-v0-0-27
Draft

Add rules_rs v0.0.27.envoy to bazel-registry with telemetry removal#3708
Copilot wants to merge 2 commits intomainfrom
copilot/add-rules-rs-v0-0-27

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Adds dzbarsky/rules_rs v0.0.27 to the local bazel-registry. The upstream module includes aspect_tools_telemetry which phones home to Aspect Build Inc. The telemetry is loaded but never functionally used, so it's cleanly stripped via patch.

Changes

  • metadata.json - Module metadata pointing to upstream github:dzbarsky/rules_rs
  • source.json - Tarball URL with integrity hashes for both tarball and patch
  • MODULE.bazel - Upstream v0.0.27 with version set to 0.0.27.envoy and telemetry bazel_dep + extension removed
  • patches/remove_telemetry.patch - Removes:
    • load("@aspect_tools_telemetry_report//:defs.bzl", "TELEMETRY") from rs/extensions.bzl
    • "@aspect_tools_telemetry_report//:defs.bzl" from bzl_library deps in rs/BUILD.bazel
  • presubmit.yml - CI config for debian11/ubuntu2404 testing build targets under @rules_rs//...

Integrity Hashes

  • Tarball: sha256-ZKOZJxQPvJ3KJsImxertVYn+6WsZHWsODq6/P2TGrRY=
  • Patch: sha256-HwgBe1DXita6BksFKYrWH0lVSuDOEI9NtFw587ZqkWA=
Original prompt

Overview

Add dzbarsky/rules_rs v0.0.27 to the Envoy toolshed bazel-registry with a patch that removes the aspect_tools_telemetry dependency.

The upstream rules_rs module (https://github.com/dzbarsky/rules_rs) bundles aspect_tools_telemetry which phones home usage data to Aspect Build Inc. This is unacceptable for Envoy's use. The telemetry is loaded but never functionally used (the load even has # buildifier: disable=load to suppress unused-load warnings), so it can be cleanly stripped out.

What needs to be created

Create the following files under bazel-registry/modules/rules_rs/:

1. bazel-registry/modules/rules_rs/metadata.json

{
    "homepage": "https://github.com/dzbarsky/rules_rs",
    "maintainers": [
        {
            "email": "maintainers@envoyproxy.io",
            "github": "envoyproxy",
            "name": "Envoy Proxy Maintainers"
        }
    ],
    "repository": [
        "github:dzbarsky/rules_rs"
    ],
    "versions": [
        "0.0.27.envoy"
    ],
    "yanked_versions": {}
}

2. bazel-registry/modules/rules_rs/0.0.27.envoy/source.json

The upstream release tarball is at: https://github.com/dzbarsky/rules_rs/releases/download/v0.0.27/rules_rs-v0.0.27.tar.gz

You need to compute the integrity hash. Use sha256 integrity format matching the existing registry pattern (e.g. "sha256-..." base64-encoded). You can compute it by downloading the tarball and running:

curl -sL https://github.com/dzbarsky/rules_rs/releases/download/v0.0.27/rules_rs-v0.0.27.tar.gz | sha256sum

Then base64-encode the hex hash for the integrity field.

The source.json should reference the patch file and look like:

{
    "url": "https://github.com/dzbarsky/rules_rs/releases/download/v0.0.27/rules_rs-v0.0.27.tar.gz",
    "integrity": "<computed sha256 integrity>",
    "strip_prefix": "",
    "patches": {
        "remove_telemetry.patch": "<computed sha256 integrity of patch file>"
    },
    "patch_strip": 1
}

3. bazel-registry/modules/rules_rs/0.0.27.envoy/MODULE.bazel

This should be a copy of the upstream MODULE.bazel from v0.0.27 (at commit f995a4c17df970158a24c93d586f87f60a4887e8) but with:

  • The version changed to "0.0.27.envoy" in the module() call
  • The aspect_tools_telemetry bazel_dep removed
  • The tel = use_extension(...) and use_repo(tel, ...) lines removed

The upstream MODULE.bazel content is:

"Bazel dependencies"

module(
    name = "rules_rs",
)

bazel_dep(name = "rules_rust", version = "0.66.0")

rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools")
rust_host_tools.host_tools(
    name = "rs_rust_host_tools",
)
use_repo(
    rust_host_tools,
    "rs_rust_host_tools",
)

http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

[
    http_file(
        name = "toml2json_" + name,
        executable = True,
        sha256 = sha256,
        url = "https://github.com/dzbarsky/toml2json/releases/download/v0.0.7/toml2json_" + name + ext,
    )
    for name, sha256, ext in [
        ("darwin_amd64", "e2240483b28d95c7ae9ded7fb0e921142a644d6847c1da9b44ae3557117ed54f", ""),
        ("darwin_arm64", "20dd55c9d926a00b51c643a3c5677678eb5ddb8984ae2ad9cf3f701ccbb06d92", ""),
        ("linux_amd64", "f074ff54589ca601a491d3f8e33b9618d861d19d8e2359a0addf02d378f36c7c", ""),
        ("linux_arm64", "3f35040836858b5c1703be421ea1c06f83c68b6c14da37d0ee0655db891f125f", ""),
        ("windows_amd64", "7e5561170e088c717f87ba4c05ec6d3a0406b62133959530c2f4646158c27a97", ".exe"),
        ("windows_arm64", "bc6fbf776798a7beb7cb2b3feb898fcbc829b4106f0505cd08f251e7c1b2518e", ".exe"),
    ]
]

bazel_dep(name = "bazel_lib", version = "3.0.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "package_metadata", version = "0.0.5")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_cc", version = "0.2.8")
bazel_dep(name = "aspect_tools_telemetry", version = "0.3.2")

tel = use_extension("@aspect_tools_telemetry//:extension.bzl", "telemetry")
use_repo(tel, "aspect_tools_telemetry_report")

bazel_dep(name = "rules_go", version = "0.59.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.47.0", dev_dependency = True)
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.8.2", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "6.1.2", dev_dependency = True)

Remove the 3 telemetry-related lines and set version to "0.0.27.envoy".

4. bazel-registry/modules/rules_rs/0.0.27.envoy/patches/remove_telemetry.patch

This patch must apply to the upstream tarball and make these changes:

a) rs/extensions.bzl — Remove line 1:

load("@aspect_tools_telemetry_report//:defs.bzl", "TELEMETRY")  # buildifier: disable=load

b) rs/BUILD.bazel — Remove the @aspect_tools_telemetry_report//:defs.bzl line from the deps list of the bzl_library target:

        "@aspect...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/envoyproxy/toolshed/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Feb 8, 2026

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit be88661
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/698845d7f2ba7000089b5d81
😎 Deploy Preview https://deploy-preview-3708--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dzbarsky/rules_rs v0.0.27 to bazel-registry Add rules_rs v0.0.27.envoy to bazel-registry with telemetry removal Feb 8, 2026
Copilot AI requested a review from phlax February 8, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants