Skip to content
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

wasm: add V8-based WebAssembly runtime. #8592

Merged
merged 25 commits into from
Nov 5, 2019
Merged

Conversation

PiotrSikora
Copy link
Contributor

Part of #4272.

Signed-off-by: Piotr Sikora piotrsikora@google.com

Part of envoyproxy#4272.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora PiotrSikora marked this pull request as ready for review October 12, 2019 10:25
@PiotrSikora
Copy link
Contributor Author

Coverage isn't great, but should be ready for review otherwise.

cc @mattklein123 @lizan @jplevyak

@mattklein123 mattklein123 self-assigned this Oct 13, 2019
@PiotrSikora
Copy link
Contributor Author

macOS builds are failing because of an old XCode version on Azure Pipelines (while most of the bleeding edge compiler flags are disabled, XCode 10.x is based on clang-7, which is a bit too old for Chromium/V8, which normally bundles clang from trunk).

I tried to configure Azure Pipelines to use XCode 11, but I cannot figure out the correct value for xcWorkspacePath. Luckily, it looks that the macOS images on Azure Pipelines will switch to XCode 11.1 by default in a week or two.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Contributor Author

You'll need to run xcode-select: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#xcode

Thanks! That was way easier than using XCode task.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff. Will defer to @lizan for review since this is mostly build setup. Thank you!

@mattklein123 mattklein123 removed their assignment Oct 17, 2019
source/extensions/common/wasm/v8/v8.cc Outdated Show resolved Hide resolved
.azure-pipelines/macos.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,24 @@
licenses(["notice"]) # Apache 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you're working on bazel native build, where is it? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am, but it's not my top priority at this moment.

source/extensions/common/wasm/v8/v8.cc Outdated Show resolved Hide resolved
source/extensions/common/wasm/v8/v8.cc Outdated Show resolved Hide resolved
@lizan
Copy link
Member

lizan commented Oct 24, 2019

@mattklein123 FYI the v8.cc (whose diff is automatically hidden by GH 🤦‍♂ ) is not build setup and that's the crux of this PR, do you want to take a look too?

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Copy link
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly style, are you adding tests for more coverage?

source/extensions/common/wasm/v8/v8.h Outdated Show resolved Hide resolved
source/extensions/common/wasm/v8/v8.cc Outdated Show resolved Hide resolved
source/extensions/common/wasm/v8/v8.cc Outdated Show resolved Hide resolved
source/extensions/common/wasm/v8/v8.cc Outdated Show resolved Hide resolved
source/extensions/common/wasm/v8/v8.cc Show resolved Hide resolved
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@lizan
Copy link
Member

lizan commented Oct 28, 2019

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Contributor Author

@lizan I've added more tests and ripped out dead code, the rest is a bunch of logging helpers and logs for stuff that we don't have too much use right now... let me know if the coverage looks reasonable enough now.

@PiotrSikora
Copy link
Contributor Author

/azp run envoy-linux

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 8592 in repo envoyproxy/envoy

@lizan
Copy link
Member

lizan commented Nov 1, 2019

@PiotrSikora can you merge master?

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Contributor Author

@lizan ping

@lizan lizan merged commit 6bbe6f3 into envoyproxy:master Nov 5, 2019
@moderation
Copy link
Contributor

@PiotrSikora Very cool to see this capability get closer. Are there plans to add to https://github.com/envoyproxy/envoy/blob/master/source/extensions/extensions_build_config.bzl so WASM can be compiled out if not required?

@lizan
Copy link
Member

lizan commented Nov 5, 2019

@moderation all wasm code are not linked into release binary yet. When we do extension registration it will be added to extensions_build_config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants