Skip to content

Re-add protobuf dependency. #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ cc_library(
defines = ["PROXY_WASM_HAS_RUNTIME_NULL"],
deps = [
":headers",
"@com_google_protobuf//:protobuf_lite",
"@proxy_wasm_cpp_sdk//:api_lib",
],
)
Expand Down
2 changes: 2 additions & 0 deletions bazel/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

def proxy_wasm_cpp_host_dependencies():
protobuf_deps()
rust_repositories()
proxy_wasm_cpp_host_fetch_remote_crates()
13 changes: 10 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def proxy_wasm_cpp_host_repositories():
http_archive(
name = "proxy_wasm_cpp_sdk",
sha256 = "489768fb95ede507543ee5982610b541a2c5b57216695a9e5c2eb8c83c9d20a3",
strip_prefix = "proxy-wasm-cpp-sdk-9af5ac0145a8790f62ca501c43f6fa1ea24d2d93",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/9af5ac0145a8790f62ca501c43f6fa1ea24d2d93.tar.gz"],
sha256 = "92521027a43ca79b62d92fae2f141ef0b7ce04ed4cdbfb7e226d7f1d289a80aa",
strip_prefix = "proxy-wasm-cpp-sdk-ebd7b1598021273964fa480720c7a7c750365f47",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/ebd7b1598021273964fa480720c7a7c750365f47.tar.gz"],
)

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

http_archive(
name = "com_google_protobuf",
sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2",
strip_prefix = "protobuf-3.17.3",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz",
)

http_archive(
name = "com_github_bytecodealliance_wasm_micro_runtime",
build_file = "@proxy_wasm_cpp_host//bazel/external:wamr.BUILD",
Expand Down
4 changes: 4 additions & 0 deletions include/proxy-wasm/wasm_api_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

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

#ifdef PROXY_WASM_PROTOBUF
#include "google/protobuf/message_lite.h"
#endif

#include <cstring>
#include <functional>
#include <memory>
Expand Down