Skip to content

Commit 19194c5

Browse files
committed
Re-add protobuf dependency.
This was incorrectly removed in #170, but it's needed by NullVM plugins that make gRPC calls (built with -DPROXY_WASM_PROTOBUF). Signed-off-by: Piotr Sikora <[email protected]>
1 parent b524f41 commit 19194c5

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ cc_library(
7979
defines = ["PROXY_WASM_HAS_RUNTIME_NULL"],
8080
deps = [
8181
":headers",
82+
"@com_google_protobuf//:protobuf_lite",
8283
"@proxy_wasm_cpp_sdk//:api_lib",
8384
],
8485
)

bazel/dependencies.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
1516
load("@proxy_wasm_cpp_host//bazel/cargo:crates.bzl", "proxy_wasm_cpp_host_fetch_remote_crates")
1617
load("@rules_rust//rust:repositories.bzl", "rust_repositories")
1718

1819
def proxy_wasm_cpp_host_dependencies():
20+
protobuf_deps()
1921
rust_repositories()
2022
proxy_wasm_cpp_host_fetch_remote_crates()

bazel/repositories.bzl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1717
def proxy_wasm_cpp_host_repositories():
1818
http_archive(
1919
name = "proxy_wasm_cpp_sdk",
20-
sha256 = "489768fb95ede507543ee5982610b541a2c5b57216695a9e5c2eb8c83c9d20a3",
21-
strip_prefix = "proxy-wasm-cpp-sdk-9af5ac0145a8790f62ca501c43f6fa1ea24d2d93",
22-
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/9af5ac0145a8790f62ca501c43f6fa1ea24d2d93.tar.gz"],
20+
sha256 = "50da0638e1f6f8f8614a7c82032e7eee2ce63acd97746f61612636f632094736",
21+
strip_prefix = "proxy-wasm-cpp-sdk-1a1969c7996fa977aac0eee92dbf21bb5f819038",
22+
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/1a1969c7996fa977aac0eee92dbf21bb5f819038.tar.gz"],
2323
)
2424

2525
http_archive(
@@ -36,6 +36,13 @@ def proxy_wasm_cpp_host_repositories():
3636
urls = ["https://github.com/google/googletest/archive/release-1.10.0.tar.gz"],
3737
)
3838

39+
http_archive(
40+
name = "com_google_protobuf",
41+
sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2",
42+
strip_prefix = "protobuf-3.17.3",
43+
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz",
44+
)
45+
3946
http_archive(
4047
name = "com_github_bytecodealliance_wasm_micro_runtime",
4148
build_file = "@proxy_wasm_cpp_host//bazel/external:wamr.BUILD",

include/proxy-wasm/wasm_api_impl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
// Required by "proxy_wasm_api.h" included within null_plugin namespace.
1919

20+
#ifdef PROXY_WASM_PROTOBUF
21+
#include "google/protobuf/message_lite.h"
22+
#endif
23+
2024
#include <cstring>
2125
#include <functional>
2226
#include <memory>

0 commit comments

Comments
 (0)