update to Rust 1.57 + latest rules_rust

This commit is contained in:
Damien Elmes 2021-12-03 20:35:52 +10:00
parent 8de3eaea65
commit 67ee6f9c0e
10 changed files with 13 additions and 19 deletions

View File

@ -17,7 +17,7 @@ build:windows --build_python_zip=false
build --workspace_status_command='bash ./scripts/status.sh'
# run clippy when compiling rust in test mode
test --aspects=@rules_rust//rust:rust.bzl%rust_clippy_aspect --output_groups=+clippy_checks
test --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect --output_groups=+clippy_checks
# print output when test fails
test --test_output=errors

View File

@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
# buildifier: disable=load
load(
"@rules_rust//rust:rust.bzl",
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
"rust_test",
@ -64,7 +64,6 @@ rust_library(
"tokio-socks",
],
crate_root = "src/lib.rs",
crate_type = "lib",
data = [],
edition = "2018",
rustc_flags = [

View File

@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
# buildifier: disable=load
load(
"@rules_rust//rust:rust.bzl",
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
"rust_test",
@ -67,7 +67,6 @@ rust_library(
"webpki-roots",
],
crate_root = "src/lib.rs",
crate_type = "lib",
data = [],
edition = "2018",
rustc_flags = [

View File

@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
# buildifier: disable=load
load(
"@rules_rust//rust:rust.bzl",
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
"rust_test",
@ -39,7 +39,6 @@ rust_library(
"default",
],
crate_root = "src/lib.rs",
crate_type = "lib",
data = [],
edition = "2018",
rustc_flags = [

View File

@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
# buildifier: disable=load
load(
"@rules_rust//rust:rust.bzl",
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
"rust_test",
@ -39,7 +39,6 @@ rust_library(
"default",
],
crate_root = "src/lib.rs",
crate_type = "lib",
data = [],
edition = "2018",
rustc_flags = [

View File

@ -1,4 +1,4 @@
load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "rust_shared_library")
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
load("@bazel_skylib//lib:selects.bzl", "selects")
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
@ -14,10 +14,9 @@ cargo_build_script(
],
)
rust_library(
rust_shared_library(
name = "rsbridge",
srcs = ["lib.rs"],
crate_type = "cdylib",
rustc_flags = selects.with_or({
(
"@rules_rust//rust/platform:x86_64-apple-darwin",

View File

@ -30,15 +30,14 @@ def register_repos():
# path = "../rules_rust",
# )
# pending merge of https://github.com/bazelbuild/rules_rust/pull/955
maybe(
http_archive,
name = "rules_rust",
strip_prefix = "rules_rust-anki-2021-11-19",
strip_prefix = "rules_rust-anki-2021-12-03",
urls = [
"https://github.com/ankitects/rules_rust/archive/anki-2021-11-19.tar.gz",
"https://github.com/ankitects/rules_rust/archive/refs/tags/anki-2021-12-03.zip",
],
sha256 = "c0fb4ce7c616a19b73967ea763cdc0481287d56482115ca67c7a52b883f1b408",
sha256 = "203d8dd78a541456dadefb2a5b51def96473a69af21b3a80f97d0946eca4fd0f",
)
# python

View File

@ -1,7 +1,7 @@
# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
load(":rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
load("//ts/sql_format:defs.bzl", "sql_format")

View File

@ -1,7 +1,7 @@
# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")

View File

@ -1,7 +1,7 @@
# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")