mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
update to Rust 1.57 + latest rules_rust
This commit is contained in:
parent
8de3eaea65
commit
67ee6f9c0e
10 changed files with 13 additions and 19 deletions
2
.bazelrc
2
.bazelrc
|
@ -17,7 +17,7 @@ build:windows --build_python_zip=false
|
||||||
build --workspace_status_command='bash ./scripts/status.sh'
|
build --workspace_status_command='bash ./scripts/status.sh'
|
||||||
|
|
||||||
# run clippy when compiling rust in test mode
|
# 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
|
# print output when test fails
|
||||||
test --test_output=errors
|
test --test_output=errors
|
||||||
|
|
|
@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
|
|
||||||
# buildifier: disable=load
|
# buildifier: disable=load
|
||||||
load(
|
load(
|
||||||
"@rules_rust//rust:rust.bzl",
|
"@rules_rust//rust:defs.bzl",
|
||||||
"rust_binary",
|
"rust_binary",
|
||||||
"rust_library",
|
"rust_library",
|
||||||
"rust_test",
|
"rust_test",
|
||||||
|
@ -64,7 +64,6 @@ rust_library(
|
||||||
"tokio-socks",
|
"tokio-socks",
|
||||||
],
|
],
|
||||||
crate_root = "src/lib.rs",
|
crate_root = "src/lib.rs",
|
||||||
crate_type = "lib",
|
|
||||||
data = [],
|
data = [],
|
||||||
edition = "2018",
|
edition = "2018",
|
||||||
rustc_flags = [
|
rustc_flags = [
|
||||||
|
|
|
@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
|
|
||||||
# buildifier: disable=load
|
# buildifier: disable=load
|
||||||
load(
|
load(
|
||||||
"@rules_rust//rust:rust.bzl",
|
"@rules_rust//rust:defs.bzl",
|
||||||
"rust_binary",
|
"rust_binary",
|
||||||
"rust_library",
|
"rust_library",
|
||||||
"rust_test",
|
"rust_test",
|
||||||
|
@ -67,7 +67,6 @@ rust_library(
|
||||||
"webpki-roots",
|
"webpki-roots",
|
||||||
],
|
],
|
||||||
crate_root = "src/lib.rs",
|
crate_root = "src/lib.rs",
|
||||||
crate_type = "lib",
|
|
||||||
data = [],
|
data = [],
|
||||||
edition = "2018",
|
edition = "2018",
|
||||||
rustc_flags = [
|
rustc_flags = [
|
||||||
|
|
|
@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
|
|
||||||
# buildifier: disable=load
|
# buildifier: disable=load
|
||||||
load(
|
load(
|
||||||
"@rules_rust//rust:rust.bzl",
|
"@rules_rust//rust:defs.bzl",
|
||||||
"rust_binary",
|
"rust_binary",
|
||||||
"rust_library",
|
"rust_library",
|
||||||
"rust_test",
|
"rust_test",
|
||||||
|
@ -39,7 +39,6 @@ rust_library(
|
||||||
"default",
|
"default",
|
||||||
],
|
],
|
||||||
crate_root = "src/lib.rs",
|
crate_root = "src/lib.rs",
|
||||||
crate_type = "lib",
|
|
||||||
data = [],
|
data = [],
|
||||||
edition = "2018",
|
edition = "2018",
|
||||||
rustc_flags = [
|
rustc_flags = [
|
||||||
|
|
3
cargo/remote/BUILD.term-0.7.0.bazel
vendored
3
cargo/remote/BUILD.term-0.7.0.bazel
vendored
|
@ -10,7 +10,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
|
|
||||||
# buildifier: disable=load
|
# buildifier: disable=load
|
||||||
load(
|
load(
|
||||||
"@rules_rust//rust:rust.bzl",
|
"@rules_rust//rust:defs.bzl",
|
||||||
"rust_binary",
|
"rust_binary",
|
||||||
"rust_library",
|
"rust_library",
|
||||||
"rust_test",
|
"rust_test",
|
||||||
|
@ -39,7 +39,6 @@ rust_library(
|
||||||
"default",
|
"default",
|
||||||
],
|
],
|
||||||
crate_root = "src/lib.rs",
|
crate_root = "src/lib.rs",
|
||||||
crate_type = "lib",
|
|
||||||
data = [],
|
data = [],
|
||||||
edition = "2018",
|
edition = "2018",
|
||||||
rustc_flags = [
|
rustc_flags = [
|
||||||
|
|
|
@ -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("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
|
||||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
||||||
|
@ -14,10 +14,9 @@ cargo_build_script(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
rust_library(
|
rust_shared_library(
|
||||||
name = "rsbridge",
|
name = "rsbridge",
|
||||||
srcs = ["lib.rs"],
|
srcs = ["lib.rs"],
|
||||||
crate_type = "cdylib",
|
|
||||||
rustc_flags = selects.with_or({
|
rustc_flags = selects.with_or({
|
||||||
(
|
(
|
||||||
"@rules_rust//rust/platform:x86_64-apple-darwin",
|
"@rules_rust//rust/platform:x86_64-apple-darwin",
|
||||||
|
|
|
@ -30,15 +30,14 @@ def register_repos():
|
||||||
# path = "../rules_rust",
|
# path = "../rules_rust",
|
||||||
# )
|
# )
|
||||||
|
|
||||||
# pending merge of https://github.com/bazelbuild/rules_rust/pull/955
|
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "rules_rust",
|
name = "rules_rust",
|
||||||
strip_prefix = "rules_rust-anki-2021-11-19",
|
strip_prefix = "rules_rust-anki-2021-12-03",
|
||||||
urls = [
|
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
|
# python
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright: Ankitects Pty Ltd and contributors
|
# Copyright: Ankitects Pty Ltd and contributors
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# 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("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
|
||||||
load(":rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
load(":rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
||||||
load("//ts/sql_format:defs.bzl", "sql_format")
|
load("//ts/sql_format:defs.bzl", "sql_format")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright: Ankitects Pty Ltd and contributors
|
# Copyright: Ankitects Pty Ltd and contributors
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# 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("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
|
||||||
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright: Ankitects Pty Ltd and contributors
|
# Copyright: Ankitects Pty Ltd and contributors
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# 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("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
|
||||||
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue