Skip to content

Commit

Permalink
[bazel] Move rules_rust back to WORKSPACE to fix zstd compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Apr 17, 2024
1 parent dadef00 commit e2426d2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
15 changes: 0 additions & 15 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_ruby", version = "0.8.1")
bazel_dep(name = "rules_rust", version = "0.42.1")

linter = use_extension("@apple_rules_lint//lint:extensions.bzl", "linter")
linter.configure(
Expand Down Expand Up @@ -322,20 +321,6 @@ use_repo(ruby, "bundle", "ruby", "ruby_toolchains")

register_toolchains("@ruby_toolchains//:all")

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain()
use_repo(rust, "rust_toolchains")

register_toolchains("@rust_toolchains//:all")

crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
crate.from_cargo(
name = "crates",
cargo_lockfile = "//rust:Cargo.lock",
manifests = ["//rust:Cargo.toml"],
)
use_repo(crate, "crates")

selenium_manager_artifacts = use_extension("//common:selenium_manager.bzl", "selenium_manager_artifacts")
use_repo(
selenium_manager_artifacts,
Expand Down
27 changes: 27 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,30 @@ load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_depende
rules_closure_dependencies()

rules_closure_toolchains()

# rules_rust

http_archive(
name = "rules_rust",
integrity = "sha256-JLN47ZcAbx9wEr5Jiib4HduZATGLiDgK7oUi/fvotzU=",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.42.1/rules_rust-v0.42.1.tar.gz"],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")

rules_rust_dependencies()

rust_register_toolchains()

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

crates_repository(
name = "crates",
cargo_lockfile = "//rust:Cargo.lock",
lockfile = "//rust:Cargo.Bazel.lock",
manifests = ["//rust:Cargo.toml"],
)

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

crate_repositories()

0 comments on commit e2426d2

Please sign in to comment.