Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ http_archive(
url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/" + PROXY_WASM_HOST_COMMIT + ".tar.gz",
)

PROXY_WASM_CPP_COMMIT = "921039ae983ce053bf5cba78a85a3c08ff9791e5" # 2023-05-01
PROXY_WASM_CPP_SHA256 = "a11adfe4e6346d3318ff72643aa5569dc8439d7e8927ed148f93226fa255cc7a"
PROXY_WASM_CPP_COMMIT = "6efffe99a90d764b063b9fa8213d2c34ae69a7da" # PR#157
PROXY_WASM_CPP_SHA256 = "db00ef59d8024d0db74a269ece76d8106c1e9afc1abed237aea8366a8db2983e"

http_archive(
name = "proxy_wasm_cpp_sdk",
Expand Down
1 change: 1 addition & 0 deletions samples/config_denylist/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ proxy_wasm_plugin_cpp(
srcs = ["plugin.cc"],
deps = [
"@proxy_wasm_cpp_sdk//contrib:contrib_lib",
"@com_google_absl//absl/strings:strings",
],
)

Expand Down
3 changes: 2 additions & 1 deletion samples/config_denylist/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <unordered_set>

#include "proxy_wasm_intrinsics.h"
#include "absl/strings/str_cat.h"

class MyRootContext : public RootContext {
public:
Expand All @@ -39,7 +40,7 @@ class MyRootContext : public RootContext {
}
idx = nxt + 1;
}
LOG_INFO("Config keys size " + std::to_string(tokens_.size()));
LOG_INFO(absl::StrCat("Config keys size ", tokens_.size()));
return true;
}

Expand Down
21 changes: 9 additions & 12 deletions samples/regex_rewrite/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,20 @@ proxy_wasm_plugin_rust(
],
)

# Blocked on emscripten update to fix Abseil/RE2 compatibility:
# https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/pull/157
# NOTE: Plugins can be built using that PR -- it's blocked on Envoy.
#proxy_wasm_plugin_cpp(
# name = "plugin_cpp.wasm",
# srcs = ["plugin.cc"],
# deps = [
# "@com_google_re2//:re2",
# "@proxy_wasm_cpp_sdk//contrib:contrib_lib",
# ],
#)
proxy_wasm_plugin_cpp(
name = "plugin_cpp.wasm",
srcs = ["plugin.cc"],
deps = [
"@com_google_re2//:re2",
"@proxy_wasm_cpp_sdk//contrib:contrib_lib",
],
)

cc_test(
name = "plugin_test",
srcs = ["test.cc"],
data = [
#":plugin_cpp.wasm",
":plugin_cpp.wasm",
":plugin_rust.wasm",
],
deps = [
Expand Down
8 changes: 4 additions & 4 deletions samples/regex_rewrite/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ namespace service_extensions_samples {

INSTANTIATE_TEST_SUITE_P(
EnginesAndPlugins, HttpTest,
::testing::Combine(::testing::ValuesIn(proxy_wasm::getWasmEngines()),
::testing::Values(
//"samples/regex_rewrite/plugin_cpp.wasm",
"samples/regex_rewrite/plugin_rust.wasm")));
::testing::Combine(
::testing::ValuesIn(proxy_wasm::getWasmEngines()),
::testing::Values("samples/regex_rewrite/plugin_cpp.wasm",
"samples/regex_rewrite/plugin_rust.wasm")));

TEST_P(HttpTest, NoMatch) {
// Create VM and load the plugin.
Expand Down