Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docker/envoy
*.iml
*.test
/artifacts
**/plugin.wasm
3 changes: 3 additions & 0 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ build:
build_envoy:
export PATH=$(PATH) CC=$(CC) CXX=$(CXX) && bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_CONFIG_REL) //src/envoy:envoy

build_wasm:
$(foreach file, $(shell find extensions -name build_wasm.sh), cd $(TOP)/$(shell dirname $(file)) && bash ./build_wasm.sh &&) true

clean:
@bazel clean

Expand Down
5 changes: 4 additions & 1 deletion extensions/common/node_info_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@

#include "extensions/common/node_info_cache.h"

#include "absl/strings/str_cat.h"
#include "extensions/common/context.h"
#include "google/protobuf/util/json_util.h"

using google::protobuf::util::Status;

#ifdef NULL_PLUGIN

using Envoy::Extensions::Common::Wasm::Null::Plugin::getStringValue;
using Envoy::Extensions::Common::Wasm::Null::Plugin::getStructValue;
using Envoy::Extensions::Common::Wasm::Null::Plugin::logDebug;
using Envoy::Extensions::Common::Wasm::Null::Plugin::logInfo;
using google::protobuf::util::Status;

#endif // NULL_PLUGIN

Expand Down
2 changes: 2 additions & 0 deletions extensions/metadata_exchange/build_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

docker run -e uid="$(id -u)" -e gid="$(id -g)" -v $PWD:/work -w /work -v $(realpath $PWD/../../extensions):/work/extensions gcr.io/istio-testing/wasmsdk:v2 bash /build_wasm.sh
rmdir extensions
3 changes: 2 additions & 1 deletion extensions/metadata_exchange/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#pragma once

#include "extensions/common/context.h"

#ifndef NULL_PLUGIN

#include <assert.h>
Expand All @@ -26,7 +28,6 @@ static const std::string EMPTY_STRING;

#else

#include "extensions/common/context.h"
#include "extensions/common/wasm/null/null_plugin.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion extensions/stats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ABSL = /root/abseil-cpp
ABSL_CPP = ${ABSL}/absl/strings/str_cat.cc ${ABSL}/absl/strings/str_split.cc ${ABSL}/absl/strings/numbers.cc ${ABSL}/absl/strings/ascii.cc

PROTO_SRCS = extensions/common/node_info.pb.cc config.pb.cc
COMMON_SRCS = extensions/common/context.cc
COMMON_SRCS = extensions/common/context.cc extensions/common/node_info_cache.cc extensions/common/util.cc

all: plugin.wasm

Expand Down
2 changes: 2 additions & 0 deletions extensions/stats/build_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

docker run -e uid="$(id -u)" -e gid="$(id -g)" -v $PWD:/work -w /work -v $(realpath $PWD/../../extensions):/work/extensions gcr.io/istio-testing/wasmsdk:v2 bash /build_wasm.sh
rmdir extensions
Binary file removed extensions/stats/plugin.wasm
Binary file not shown.