Skip to content

Commit

Permalink
build: remove rust dependencies (kythe#6069)
Browse files Browse the repository at this point in the history
  • Loading branch information
schroederc authored Mar 19, 2024
1 parent 60c6ada commit 1d5b089
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 19,044 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ tools/node
# User bazelrc overrides
/user.bazelrc

# Ignore Rust build artifacts
kythe/rust/**/target
rust-project.json

### Added by Hedron's Bazel Compile Commands Extractor: https://github.com/hedronvision/bazel-compile-commands-extractor
# The external link: Differs on Windows vs macOS/Linux, so we can't check it in. The pattern needs to not have a trailing / because it's a symlink on macOS/Linux.
/external
Expand Down
16 changes: 0 additions & 16 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//:version.bzl", "MAX_VERSION", "MIN_VERSION")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@rules_rust//proto/protobuf:toolchain.bzl", "rust_proto_toolchain")
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")

package(default_visibility = ["//visibility:private"])
Expand Down Expand Up @@ -38,7 +37,6 @@ sh_test(
# gazelle:exclude **/examples/
# gazelle:exclude **/testdata/
# gazelle:exclude **/*_go_proto/
# gazelle:exclude **/*_rust_proto/
# gazelle:prefix kythe.io
# gazelle:map_kind go_binary go_binary //tools:build_rules/shims.bzl
# gazelle:map_kind go_library go_library //tools:build_rules/shims.bzl
Expand Down Expand Up @@ -78,20 +76,6 @@ bzl_library(
srcs = ["setup.bzl"],
)

# Create a Rust protobuf toolchain with protobuf version 2.8.2
rust_proto_toolchain(
name = "rust_proto_toolchain_impl",
edition = "2021",
proto_compile_deps = ["@crate_index//:protobuf"],
proto_plugin = "@crate_index//:protobuf-codegen__protoc-gen-rust",
)

toolchain(
name = "rust_proto_toolchain",
toolchain = ":rust_proto_toolchain_impl",
toolchain_type = "@rules_rust//proto/protobuf:toolchain_type",
)

refresh_compile_commands(
name = "refresh_compile_commands",
# Gathering header compile commands fails due to mismatched clang versions with RBE.
Expand Down
35 changes: 0 additions & 35 deletions Cargo.Bazel.lock

This file was deleted.

32 changes: 0 additions & 32 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -87,38 +87,6 @@ ruby_bundle(
gemfile_lock = "//kythe/web/site:Gemfile.lock",
)

load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository", "render_config")

# Run `CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index` after updating
crates_repository(
name = "crate_index",
annotations = {
"protobuf-codegen": [crate.annotation(gen_binaries = True)],
},
cargo_lockfile = "//:Cargo.Bazel.lock",
lockfile = "//:cargo-bazel-lock.json",
packages = {
# Dependencies for our Rust protobuf toolchain
"protobuf": crate.spec(
features = ["with-bytes"],
version = "=2.28.0",
),
"protobuf-codegen": crate.spec(
version = "=2.28.0",
),
},
rust_version = "1.71.1",
)

load("@crate_index//:defs.bzl", "crate_repositories")

crate_repositories()

# Register our Rust protobuf toolchain from the BUILD file
register_toolchains(
":rust_proto_toolchain",
)

http_archive(
name = "aspect_bazel_lib",
sha256 = "d488d8ecca98a4042442a4ae5f1ab0b614f896c0ebf6e3eafff363bcc51c6e62",
Expand Down
Loading

0 comments on commit 1d5b089

Please sign in to comment.