-
Notifications
You must be signed in to change notification settings - Fork 500
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
add filter WasmHost (close #1) #116
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# Cgo is disabled by default | ||
ENABLE_CGO= CGO_ENABLED=0 | ||
|
||
# Check Go build tags, the tags are from command line of make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check whether docker image with alpine runs correctly please.
ENABLE_CGO= CGO_ENABLED=0 | ||
|
||
# Check Go build tags, the tags are from command line of make | ||
ifdef GOTAGS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I don't think it's a big deal to include more than 20MB in EG with wasm. I think it brings more concern in compilation, which gives more confusing stuff to developers, operators.
pkg/filter/wasm/wasm.go
Outdated
|
||
const ( | ||
// Kind is the kind of WasmFilter. | ||
Kind = "WasmFilter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a filter naming WasmFilter
that sounds weird/redundant to me, can we rename it to WasmRuntime
or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasmtime and wasmer are wasm runtimes, so WasmRuntime
is not a suitable name for the filter, in fact, I tried to find another one, but none seems better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WasmVM
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's WasmVM
already in our code...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about Wasm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasm
often refers to many other things like the wasm code and may bring additional confusion.
I'll rename it to WasmHost
as it is a host environment of WebAssembly, any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with it
Codecov Report
@@ Coverage Diff @@
## main #116 +/- ##
=======================================
Coverage ? 46.48%
=======================================
Files ? 38
Lines ? 2590
Branches ? 0
=======================================
Hits ? 1204
Misses ? 1305
Partials ? 81 Continue to review full report at Codecov.
|
add the
WasmHost
filter, it is disabled by default in the build because of the requirements of CGo, and can be enabled by the build command below:and this PR only includes the filter itself, we still need to develop SDKs for different languages to empower users to write their own code for the filter.