From fe6ab8816e7c01a54a47f456493762d18159fd82 Mon Sep 17 00:00:00 2001 From: Martijn Swaagman Date: Wed, 26 Jan 2022 11:14:00 +0100 Subject: [PATCH 1/3] fix: update BUILD configs Signed-off-by: Martijn Swaagman --- BUILD | 4 ++-- examples/BUILD | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BUILD b/BUILD index d905fbbf..54c5928e 100644 --- a/BUILD +++ b/BUILD @@ -1,9 +1,9 @@ -load("@rules_rust//rust:rust.bzl", "rust_library") +load("@rules_rust//rust:defs.bzl", "rust_library") rust_library( name = "proxy_wasm", srcs = glob(["src/*.rs"]), - edition = "2018", + edition = "2021", visibility = ["//visibility:public"], deps = [ "//bazel/cargo:hashbrown", diff --git a/examples/BUILD b/examples/BUILD index a5aec0a4..3e20f5d5 100644 --- a/examples/BUILD +++ b/examples/BUILD @@ -1,10 +1,10 @@ -load("@rules_rust//rust:rust.bzl", "rust_binary") +load("@rules_rust//rust:defs.bzl", "rust_binary") rust_binary( name = "hello_world", srcs = ["hello_world.rs"], crate_type = "cdylib", - edition = "2018", + edition = "2021", out_binary = True, deps = [ "//:proxy_wasm", @@ -21,7 +21,7 @@ rust_binary( name = "http_auth_random", srcs = ["http_auth_random.rs"], crate_type = "cdylib", - edition = "2018", + edition = "2021", out_binary = True, deps = [ "//:proxy_wasm", @@ -33,7 +33,7 @@ rust_binary( name = "http_headers", srcs = ["http_headers.rs"], crate_type = "cdylib", - edition = "2018", + edition = "2021", out_binary = True, deps = [ "//:proxy_wasm", @@ -45,7 +45,7 @@ rust_binary( name = "http_body", srcs = ["http_body.rs"], crate_type = "cdylib", - edition = "2018", + edition = "2021", out_binary = True, deps = [ "//:proxy_wasm", @@ -57,7 +57,7 @@ rust_binary( name = "http_config", srcs = ["http_config.rs"], crate_type = "cdylib", - edition = "2018", + edition = "2021", out_binary = True, deps = [ "//:proxy_wasm", From 9d7068be507c0135855809c770788bfd39546f9e Mon Sep 17 00:00:00 2001 From: Martijn Swaagman Date: Wed, 26 Jan 2022 14:32:16 +0100 Subject: [PATCH 2/3] dist: update rules_rust Signed-off-by: Martijn Swaagman --- bazel/repositories.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index bcd5ea0b..ce3ead96 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -19,7 +19,7 @@ def proxy_wasm_rust_sdk_repositories(): maybe( http_archive, name = "rules_rust", - sha256 = "d54b379559f3fe6ff0cd251be216a5e35acf241451eec8144455482e8f4748f8", - strip_prefix = "rules_rust-7e7246f6c48a5d4e69744cd79b9ccb8886966ee2", - url = "https://github.com/bazelbuild/rules_rust/archive/7e7246f6c48a5d4e69744cd79b9ccb8886966ee2.tar.gz", + sha256 = "6c26af1bb98276917fcf29ea942615ab375cf9d3c52f15c27fdd176ced3ee906", + strip_prefix = "rules_rust-b3ddf6f096887b757ab1a661662a95d6b2699fa7", + url = "https://github.com/bazelbuild/rules_rust/archive/b3ddf6f096887b757ab1a661662a95d6b2699fa7.tar.gz", ) From 3362e950a06ea31326afbd3f038329c659f7b1fe Mon Sep 17 00:00:00 2001 From: Martijn Swaagman Date: Mon, 31 Jan 2022 12:17:27 +0100 Subject: [PATCH 3/3] fix: revert to 2018 Signed-off-by: Martijn Swaagman --- BUILD | 2 +- examples/BUILD | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BUILD b/BUILD index 54c5928e..6d5f6672 100644 --- a/BUILD +++ b/BUILD @@ -3,7 +3,7 @@ load("@rules_rust//rust:defs.bzl", "rust_library") rust_library( name = "proxy_wasm", srcs = glob(["src/*.rs"]), - edition = "2021", + edition = "2018", visibility = ["//visibility:public"], deps = [ "//bazel/cargo:hashbrown", diff --git a/examples/BUILD b/examples/BUILD index 3e20f5d5..d2bd0764 100644 --- a/examples/BUILD +++ b/examples/BUILD @@ -4,7 +4,7 @@ rust_binary( name = "hello_world", srcs = ["hello_world.rs"], crate_type = "cdylib", - edition = "2021", + edition = "2018", out_binary = True, deps = [ "//:proxy_wasm", @@ -21,7 +21,7 @@ rust_binary( name = "http_auth_random", srcs = ["http_auth_random.rs"], crate_type = "cdylib", - edition = "2021", + edition = "2018", out_binary = True, deps = [ "//:proxy_wasm", @@ -33,7 +33,7 @@ rust_binary( name = "http_headers", srcs = ["http_headers.rs"], crate_type = "cdylib", - edition = "2021", + edition = "2018", out_binary = True, deps = [ "//:proxy_wasm", @@ -45,7 +45,7 @@ rust_binary( name = "http_body", srcs = ["http_body.rs"], crate_type = "cdylib", - edition = "2021", + edition = "2018", out_binary = True, deps = [ "//:proxy_wasm", @@ -57,7 +57,7 @@ rust_binary( name = "http_config", srcs = ["http_config.rs"], crate_type = "cdylib", - edition = "2021", + edition = "2018", out_binary = True, deps = [ "//:proxy_wasm",