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

feat(new transform): Introduce WASM Plugins #2006

Merged
merged 100 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
e1b5c2c
Add wip
Hoverbear Mar 2, 2020
47f3231
wip
Hoverbear Mar 4, 2020
13bac4d
wip
Hoverbear Mar 7, 2020
3aca385
WIP
Hoverbear Mar 9, 2020
aaf2a4d
Fix bindings
Hoverbear Mar 9, 2020
764cd51
Integrate Make task
Hoverbear Mar 11, 2020
d58b370
Remove old cruft
Hoverbear Mar 11, 2020
e6c368f
More refinements to rfc
Hoverbear Mar 12, 2020
48ba013
Get function passing working
Hoverbear Mar 12, 2020
5400b35
Tracing and proper FFI strings
Hoverbear Mar 19, 2020
6ef2bae
Wip
Hoverbear Mar 23, 2020
28597be
🚀
Hoverbear Mar 23, 2020
dd66604
More RFC notes
Hoverbear Mar 24, 2020
a3b0ec3
Format wasm rfc
Hoverbear Mar 28, 2020
b8cca2b
Add API notes
Hoverbear Mar 29, 2020
4ec5cc7
Write more of the RFC
Hoverbear Mar 30, 2020
059cc68
Add plan of attack and platform support
Hoverbear Mar 31, 2020
34aadf7
Minor fixes.
Hoverbear Apr 2, 2020
46695eb
Command line test passes
Hoverbear Apr 5, 2020
d5d1c8b
Extract foreign module APIs.
Hoverbear Apr 5, 2020
0a9af62
Do some documentation.
Hoverbear Apr 6, 2020
d100505
More RFC writing
Hoverbear Apr 7, 2020
bf12883
Merge branch 'master' into wasm-engine
Hoverbear Apr 7, 2020
d2817a1
Cleanup and RFC updating.
Hoverbear Apr 7, 2020
637f807
Checkpoint
Hoverbear Apr 8, 2020
bcf41a5
Passing a Raw registration up works
Hoverbear Apr 8, 2020
4c03d12
Update RFC to reflect new simpler APIs.
Hoverbear Apr 9, 2020
e7caaa8
Various cleaning of structure.
Hoverbear Apr 9, 2020
24e4092
Some refining on docs and roles
Hoverbear Apr 29, 2020
a1cd312
Merge branch 'master' into wasm-engine
Hoverbear Apr 29, 2020
52d1fb6
Some new events
Hoverbear Apr 29, 2020
5903b97
Remove RFC present in other PR
Hoverbear Apr 29, 2020
7dc5c1d
Merge branch 'wasm-engine' of github.com:/timberio/vector into wasm-e…
Hoverbear Apr 29, 2020
23cba79
Fix release builds and add new metric
Hoverbear Apr 29, 2020
5ca7ccd
Rename somethings
Hoverbear Apr 30, 2020
8120f27
Caching and fingerprinting works now.
Hoverbear Apr 30, 2020
b1a42d7
Add benchmark for wasm protobuf
Hoverbear Apr 30, 2020
81abe32
Add noop bench
Hoverbear Apr 30, 2020
7caafee
Add wasm CI
Hoverbear Apr 30, 2020
e335e3c
Merge branch 'master' into wasm-engine
Hoverbear May 1, 2020
43a2f40
Update lockfile
Hoverbear May 1, 2020
e6992c0
Clean up make jobs, benching
Hoverbear May 1, 2020
90c007c
Fixup make jobs
Hoverbear May 1, 2020
5dce7ae
Use WATS
Hoverbear May 1, 2020
cb0bfef
Figure out less hazardous memory management (demo)
Hoverbear May 4, 2020
1dff9ed
Responsible memory management
Hoverbear May 4, 2020
5091278
process takes pointer/len, emit works
Hoverbear May 6, 2020
0368a89
Better benchmarks
Hoverbear May 6, 2020
cd0e086
Merge branch 'master' into wasm-engine
Hoverbear May 6, 2020
2a9725e
Add docs
Hoverbear May 6, 2020
f59f573
Merge branch 'master' into wasm-engine
Hoverbear May 7, 2020
ac9bb89
Fixup nits.
Hoverbear May 7, 2020
406dbf0
Add website files
Hoverbear May 7, 2020
8043cb0
Rework registration.
Hoverbear May 7, 2020
d64e4f7
Some refining of the protobuf transform and tests.
Hoverbear May 7, 2020
969b35e
Fixup benches.
Hoverbear May 7, 2020
7f71c8a
Make emit more flexible.
Hoverbear May 7, 2020
2aa885a
Add tests for other mods
Hoverbear May 8, 2020
327fb4e
Add transform changes
Hoverbear May 8, 2020
e2f65e5
Add error handling
Hoverbear May 11, 2020
6e0c097
Add panic handling
Hoverbear May 11, 2020
cc7a42e
No more stale wats
Hoverbear May 11, 2020
25b5e1b
wasm interop exposed and more protobuf guide
Hoverbear May 11, 2020
6fe88b3
Clean up
Hoverbear May 13, 2020
545b68a
Various small fixes
Hoverbear May 13, 2020
ebc8cfc
Add cached metric to compilation event
Hoverbear May 13, 2020
f673aa3
Clean up test spans
Hoverbear May 13, 2020
a0ade0d
More robust protobuf
Hoverbear May 14, 2020
a9855c3
Add options calls to WASM modules.
Hoverbear May 15, 2020
141f3b2
checkpoint
Hoverbear May 15, 2020
52ec949
Improve fingerprinter.
Hoverbear May 15, 2020
5e0a073
Add wasm-timings feature
Hoverbear May 15, 2020
94a8c23
Add assert config
Hoverbear May 15, 2020
fbb456f
Extract fingerprint and artifact cache.
Hoverbear May 15, 2020
7579610
Remove protobuf guide.
Hoverbear May 15, 2020
651a044
Make things much more safe.
Hoverbear May 15, 2020
1d88625
Fix a whole swack of integer sizing issues.
Hoverbear May 16, 2020
ae3d5d6
Update to git master lucet
Hoverbear May 29, 2020
f13723d
Add nix env
Hoverbear May 29, 2020
2496600
Merge branch 'master' into wasm-engine
Hoverbear Jun 8, 2020
da8202d
Update lucet/tracing
Hoverbear Jun 8, 2020
b2ae7af
Note we support wat as well
Hoverbear Jun 9, 2020
49760a6
Raise some debug to info
Hoverbear Jun 9, 2020
b0423d3
fmt
Hoverbear Jun 9, 2020
c4a0372
Add artifact_cache knob
Hoverbear Jun 9, 2020
c5be593
Remove WATs
Hoverbear Jun 9, 2020
f7d938d
Merge branch 'master' into wasm-engine
Hoverbear Jun 9, 2020
07c4699
Clean up formatting and some clippy lints
Hoverbear Jun 9, 2020
0627d7a
Fixup features in benches
Hoverbear Jun 9, 2020
b6d3064
Checker now needs cmake
Hoverbear Jun 9, 2020
c2764a0
Fmt
Hoverbear Jun 9, 2020
850671d
Fixup bench features
Hoverbear Jun 9, 2020
03e921f
Add OS support to transforms on website
Hoverbear Jun 10, 2020
9455eb5
Wasm doesn't need wabt anymore
Hoverbear Jun 10, 2020
8ac1555
Fixup CI
Hoverbear Jun 10, 2020
84750b2
Remove bench features haha
Hoverbear Jun 10, 2020
f2d2483
Correct lib authors
Hoverbear Jun 10, 2020
7d6f2b2
Yank utf-8 handling change
Hoverbear Jun 10, 2020
e12b6a2
generate
Hoverbear Jun 10, 2020
ba92982
Decouple wasm modules from workspace
Hoverbear Jun 10, 2020
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
5 changes: 5 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "link-args=-rdynamic"]

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-args=-rdynamic"]
3 changes: 3 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@
- name: "transform: tokenizer"
description: Anything `tokenizer` transform related
color: 54a0ff
- name: "transform: wasm"
description: Anything `wasm` transform related
color: 54a0ff

#
# sink
Expand Down
1 change: 1 addition & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ scopes:
- swimlanes transform
- tag_cardinality_limit transform
- tokenizer transform
- wasm transform

# sinks
- aws_cloudwatch_logs sink
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ jobs:
- run: make slim-builds
- run: make test-unit

wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make slim-builds
- run: make ensure-has-wasm-toolchain
- run: make build-wasm-tests
- run: make test-wasm

test-default:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ miniodat
sample.log
target
node_modules
tests/data/wasm/*/target
8 changes: 8 additions & 0 deletions .meta/.schemas/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,14 @@
"description": "A simple title for this transform, typically one word.",
"minLength": 1,
"max_lenfth": 50
},
"only_operating_systems": {
"$ref": "#/definitions/operating_systems",
"description": "A whitelist of operating systems supported by this source."
},
"except_operating_systems": {
"$ref": "#/definitions/operating_systems",
"description": "A blacklist of operating systems not supported by this source."
}
}
}
Expand Down
66 changes: 66 additions & 0 deletions .meta/transforms/wasm.toml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[transforms.wasm]
title = "WASM"
allow_you_to_description = "execute **experimental** WASM plugins"
beta = true
common = false
function_category = "program"
input_types = ["log"]
output_types = ["log"]
requirements = {}
only_operating_systems = ["Linux"]

<%= render("_partials/fields/_component_options.toml", type: "transform", name: "wasm") %>

[transforms.wasm.options.module]
type = "string"
examples = [
"./modules/example.wasm",
"/example.wat",
"example.wasm",
]
common = true
required = true
description = """\
The file path of the `.wasm` or `.wat` module.
"""

[transforms.wasm.options.artifact_cache]
type = "string"
examples = [
"/etc/vector/artifacts",
"/var/lib/vector/artifacts",
"C:\\vector\\artifacts",
]
common = true
required = true
description = """\
The directory where Vector should store the artifact it builds of this WASM module. Typically, all WASM modules share this.
"""

[transforms.wasm.options.heap_max_size]
type = "int"
common = true
default = 10485760
required = false
description = """\
The maximum size of the heap of this module, in bytes. (This includes the module itself, default is 10 MB.)
"""

[[transforms.wasm.examples]]
label = "Generic"
body = """\
Given the following configuration:

<CodeHeader fileName="vector.toml" />

```toml title="vector.toml"
[transforms.test]
inputs = [...]
type = "wasm"
module = "module.wasm"
artifact_cache = "artifacts/"
```

Accompanied by a `module.wasm` file built via `cargo +nightly --target wasm32-wasi ...`, Vector will use the module as a
custom transform.
"""
Loading