Migrate rules_rust main repository to defs.bzl and smaller rules (#987)

This commit is contained in:
Marcel Hlopko 2021-10-23 07:45:55 +02:00 committed by GitHub
parent 555b521a16
commit bab14a4751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 22 additions and 82 deletions

View File

@ -1,5 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//rust:rust.bzl", "rust_binary")
load("//rust:defs.bzl", "rust_binary")
load(":toolchain.bzl", "rust_proto_toolchain")
package(default_visibility = ["//visibility:public"])

View File

@ -2,10 +2,7 @@ load(
"//cargo:cargo_build_script.bzl",
"cargo_build_script",
)
load(
"//rust:rust.bzl",
"rust_test",
)
load("//rust:defs.bzl", "rust_test")
package(default_visibility = ["//visibility:public"])

View File

@ -1,7 +1,7 @@
"""Tests for the cargo_build_script rule"""
load("//cargo:cargo_build_script.bzl", "cargo_build_script")
load("//rust:rust.bzl", "rust_test")
load("//rust:defs.bzl", "rust_test")
# Test that tools are built in the exec configuration.
cargo_build_script(

View File

@ -1,9 +1,4 @@
load(
"//rust:rust.bzl",
"rust_doc_test",
"rust_library",
"rust_test",
)
load("//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")
rust_library(
name = "mod1",

View File

@ -1,10 +1,4 @@
load(
"@rules_rust//rust:rust.bzl",
"rust_binary",
"rust_clippy",
"rust_library",
"rust_test",
)
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_clippy", "rust_library", "rust_test")
package(default_visibility = ["//test:__subpackages__"])

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
"rust_test",
)
load("//rust:defs.bzl", "rust_library", "rust_test")
package(default_visibility = ["//visibility:public"])

View File

@ -1,7 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
)
load("//rust:defs.bzl", "rust_library")
package(default_visibility = ["//visibility:public"])

View File

@ -1,7 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
)
load("//rust:defs.bzl", "rust_library")
package(default_visibility = ["//visibility:public"])

View File

@ -1,7 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
)
load("//rust:defs.bzl", "rust_library")
package(default_visibility = ["//visibility:public"])

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
"rust_test",
)
load("//rust:defs.bzl", "rust_library", "rust_test")
package(default_visibility = ["//visibility:public"])

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
"rust_test",
)
load("//rust:defs.bzl", "rust_library", "rust_test")
package(default_visibility = ["//visibility:public"])

View File

@ -1,10 +1,5 @@
load("//cargo:cargo_build_script.bzl", "cargo_build_script")
load("//rust:defs.bzl", "rust_test_suite")
load(
"//rust:rust.bzl",
"rust_library",
"rust_test",
)
load("//rust:defs.bzl", "rust_library", "rust_test", "rust_test_suite")
cargo_build_script(
name = "build_script",

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_library",
"rust_test",
)
load("//rust:defs.bzl", "rust_library", "rust_test")
rust_library(
name = "mod1",

View File

@ -1,4 +1,4 @@
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
load("//rust:defs.bzl", "rust_binary", "rust_library")
package(default_visibility = ["//visibility:public"])

View File

@ -1,7 +1,4 @@
load(
"@rules_rust//rust:rust.bzl",
"rust_binary",
)
load("//rust:defs.bzl", "rust_binary")
package(default_visibility = ["//visibility:public"])

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_binary",
"rust_test",
)
load("//rust:defs.bzl", "rust_binary", "rust_test")
rust_binary(
name = "hello-world",

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_binary",
"rust_test",
)
load("//rust:defs.bzl", "rust_binary", "rust_test")
rust_binary(
name = "hello-world",

View File

@ -1,5 +1,5 @@
load("//cargo:cargo_build_script.bzl", "cargo_build_script")
load("//rust:rust.bzl", "rust_binary", "rust_library")
load("//rust:defs.bzl", "rust_binary", "rust_library")
# sets link alias
cargo_build_script(
@ -13,7 +13,6 @@ cargo_build_script(
rust_library(
name = "dll_user",
srcs = ["dll_user.rs"],
crate_type = "lib",
edition = "2018",
deps = [
":buildscript",

View File

@ -1,8 +1,4 @@
load(
"//rust:rust.bzl",
"rust_binary",
"rust_test",
)
load("//rust:defs.bzl", "rust_binary", "rust_test")
package(default_visibility = ["//visibility:public"])

View File

@ -1,4 +1,4 @@
load("//rust:rust.bzl", "rust_binary")
load("//rust:defs.bzl", "rust_binary")
rust_binary(
name = "dir_zipper",

View File

@ -1,4 +1,4 @@
load("//rust:rust.bzl", "rust_library", "rust_test")
load("//rust:defs.bzl", "rust_library", "rust_test")
rust_library(
name = "label",

View File

@ -1,4 +1,4 @@
load("//rust:rust.bzl", "rust_binary")
load("//rust:defs.bzl", "rust_binary")
package(default_visibility = ["//visibility:public"])