Skip to content

Commit

Permalink
Upgrade cargo packages and rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
allada committed Aug 18, 2021
1 parent 90b43c6 commit 7956a02
Show file tree
Hide file tree
Showing 316 changed files with 6,464 additions and 2,317 deletions.
1,137 changes: 852 additions & 285 deletions Cargo.lock

Large diffs are not rendered by default.

46 changes: 29 additions & 17 deletions Cargo.toml
Expand Up @@ -10,32 +10,44 @@ path = "needed_only_to_make_cargo_tooling_happy.rs"
[dependencies]
prost = "0.7.0"
prost-types = "0.7.0"
hex = "0.4.2"
hex = "0.4.3"
async-mutex = "1.4.0"
async-trait = "0.1.42"
fixed-buffer = "0.2.2"
futures = "0.3.12"
tokio = { version = "1.0.2", features = ["macros", "io-util", "fs", "rt-multi-thread"] }
tokio-stream = "0.1.2"
tonic = "0.4.0"
lazy-init = "0.4.0"
log = "0.4.11"
env_logger = "0.8.2"
async-trait = "0.1.51"
fixed-buffer = "0.2.3"
futures = "0.3.16"
tokio = { version = "1.10.0", features = ["macros", "io-util", "fs", "rt-multi-thread"] }
tokio-stream = "0.1.7"
tokio-util = { version = "0.6.7", features = ["io"] }
tonic = "0.5.2"
lazy-init = "0.5.0"
log = "0.4.14"
env_logger = "0.9.0"
drop_guard = "0.2.1"
serde = "1.0.119"
serde = "1.0.127"
json5 = "0.3.0"
sha2 = "0.9.2"
lru = "0.6.3"
sha2 = "0.9.5"
lru = "0.6.6"
rand = "0.8.4"
rusoto_s3 = "0.46.0"
rusoto_core = "0.46.0"
http = "^0.2"
zeroize = "<1.4"

[dev-dependencies]
clap = "2.33.3"
stdext = "0.2.1"
prost-build = "0.7.0"
tonic-build = "0.3.1"
pretty_assertions = "0.6.1"
tonic-build = "0.5.2"
pretty_assertions = "0.7.2"
rustfmt-nightly = "1.4.21"
maplit = "1.0.2"
mock_instant = "0.2"
mock_instant = "0.2.1"
rusoto_mock = "0.46.0"

[patch.crates-io]
rusoto_mock = { git = "https://github.com/allada/rusoto.git", branch = "with_request_checker-owned-0.46.0" }
rusoto_credential = { git = "https://github.com/allada/rusoto.git", branch = "with_request_checker-owned-0.46.0" }
rusoto_signature = { git = "https://github.com/allada/rusoto.git", branch = "with_request_checker-owned-0.46.0" }

[package.metadata.raze.crates.json5.'*']
data_attr = "['src/json5.pest']"
Expand Down Expand Up @@ -65,7 +77,7 @@ workspace_path = "//third_party"

default_gen_buildrs = true

rust_rules_workspace_name = "io_bazel_rules_rust"
rust_rules_workspace_name = "rules_rust"

# This causes aliases for dependencies to be rendered in the BUILD
# file located next to this `Cargo.toml` file.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -4,6 +4,9 @@ Install bazel 3.0.0+ then run:
$ bazel build //...
```

## Requirements
Currently we require rust 1.51+.

## How to update external rust deps
Install `cargo` and then run: `cargo install cargo-raze`.
From now on you can use:
Expand Down
16 changes: 8 additions & 8 deletions WORKSPACE
@@ -1,24 +1,24 @@
# Copyright 2020 Nathan (Blaise) Bruer. All rights reserved.
# Copyright 2020-2021 Nathan (Blaise) Bruer. All rights reserved.

workspace(name = "rust_cas")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_rust",
sha256 = "bbebfd5b292fa8567fa012b3d1056f2e51611fe8ac898860323b6b4d763a4efd",
strip_prefix = "rules_rust-c7a408a8c58c6dde73a552d6f78f90c7ef96b513",
name = "rules_rust",
sha256 = "accb5a89cbe63d55dcdae85938e56ff3aa56f21eb847ed826a28a83db8500ae6",
strip_prefix = "rules_rust-9aa49569b2b0dacecc51c05cee52708b7255bd98",
urls = [
# Master branch as of 2020-11-10
"https://github.com/bazelbuild/rules_rust/archive/c7a408a8c58c6dde73a552d6f78f90c7ef96b513.tar.gz",
# Main branch as of 2021-02-19
"https://github.com/bazelbuild/rules_rust/archive/9aa49569b2b0dacecc51c05cee52708b7255bd98.tar.gz",
],
)

load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
load("@rules_rust//rust:repositories.bzl", "rust_repositories")
rust_repositories(version = "nightly", iso_date = "2020-11-10", edition="2018")

load("//third_party:crates.bzl", "raze_fetch_remote_crates")
raze_fetch_remote_crates()

load("@io_bazel_rules_rust//proto:repositories.bzl", "rust_proto_repositories")
load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories")
rust_proto_repositories()
4 changes: 2 additions & 2 deletions cas/BUILD
@@ -1,6 +1,6 @@
# Copyright 2020-2021 Nathan (Blaise) Bruer. All rights reserved.

load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary")
load("@rules_rust//rust:rust.bzl", "rust_binary")

rust_binary(
name = "cas",
Expand All @@ -21,6 +21,6 @@ rust_binary(
"//third_party:tonic",
"//util:common",
"//util:error",
"@io_bazel_rules_rust//tools/runfiles",
"@rules_rust//tools/runfiles",
],
)
2 changes: 1 addition & 1 deletion cas/grpc_service/BUILD
@@ -1,6 +1,6 @@
# Copyright 2020-2021 Nathan (Blaise) Bruer. All rights reserved.

load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test")

rust_library(
name = "cas_server",
Expand Down
2 changes: 1 addition & 1 deletion cas/store/BUILD
@@ -1,6 +1,6 @@
# Copyright 2020-2021 Nathan (Blaise) Bruer. All rights reserved.

load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test")

rust_library(
name = "store",
Expand Down
2 changes: 1 addition & 1 deletion config/BUILD
@@ -1,6 +1,6 @@
# Copyright 2021 Nathan (Blaise) Bruer. All rights reserved.

load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library")
load("@rules_rust//rust:rust.bzl", "rust_library")

exports_files(["examples/basic_cas.json"])

Expand Down
3 changes: 2 additions & 1 deletion proto/BUILD
@@ -1,6 +1,6 @@
# Copyright 2020 Nathan (Blaise) Bruer. All rights reserved.

load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_library")
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library")

# These build rules will do the following:
# 1. Fetch all .proto files under in this directory
Expand Down Expand Up @@ -40,6 +40,7 @@ genrule(
"trap \"rm -rf $$TMPPATH\" EXIT",
"ln -s $$PWD/$(location //third_party:cargo_bin_rustfmt) $$TMPPATH/rustfmt",
"export PATH=$$TMPPATH:$$PATH",
"export PROTOC=bazel-out/host/bin/external/com_google_protobuf/protoc",
"$(execpath :gen_protos_tool) --output_dir $(RULEDIR) " + " ".join([
("--input $(location :%s)" % file) for file in _proto_files
]),
Expand Down

0 comments on commit 7956a02

Please sign in to comment.