-
Notifications
You must be signed in to change notification settings - Fork 53
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
perf: Switch LensVM to wasmtime runtime #2030
perf: Switch LensVM to wasmtime runtime #2030
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2030 +/- ##
===========================================
- Coverage 74.03% 73.78% -0.25%
===========================================
Files 248 248
Lines 24801 24801
===========================================
- Hits 18359 18298 -61
- Misses 5189 5236 +47
- Partials 1253 1267 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
23ba654
to
1623a0b
Compare
6884f19
to
0fd88e0
Compare
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
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.
Comment from discord after passing make test:lens
on windows:
Perhaps can add in README:
- Enable CGO
- Need GCC (for windows need mingw, i.e.
choco install mingw
)
CGO is needed regardless with this wasmtime integration. Is there something more specific you are referring to with the windows build? |
Yea so normally on linux I have never had to worry about enabling cgo manually. However on windows, by default cgo is disabled. So it needs to be enabled and Inaddition the mingw dependency is needed for gcc tool chain. Would be nice to document this in build requirements in README explicitly for windows. |
The need for cgo really sucks. Too bad Wasmer isn't more actively maintained. |
CGO applied to wasmer as well. Unless you mean wazero. But yes, not a fan of it in general, as it does some wonky things to the go runtime. It shouldn't be hard to get wazero back to a place we can use it with the enumerator work. Then we can add a option as to which build users want. Wasmtime and speed, but with cgo vs wazero and slower, but no cgo |
I think I mixed the two yes 🙃 |
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
9944c58
to
ed55acc
Compare
New version has the wasmtime runtime
ed55acc
to
a32a92c
Compare
## Relevant issue(s) Resolves sourcenetwork#2029 ## Description Switches LensVM to the wasmtime runtime. Should be a fair bit faster than wazero, and supports all the important build targets. Also doesn't suffer from tetratelabs/wazero#1818 Note on [wasmtime-go](https://github.com/bytecodealliance/wasmtime-go): > This Go library uses CGO to consume the C API of the [Wasmtime project](https://github.com/bytecodealliance/wasmtime) which is written in Rust. Precompiled binaries of Wasmtime are checked into this repository on tagged releases so you won't have to install Wasmtime locally, but it means that this project only works on Linux x86_64, macOS x86_64 , and Windows x86_64 currently. Building on other platforms will need to arrange to build Wasmtime and use CGO_* env vars to compile correctly. This is different to wazero, which as a pure Go project supports pretty much anything Go does without messing about.
## Relevant issue(s) Resolves sourcenetwork#2029 ## Description Switches LensVM to the wasmtime runtime. Should be a fair bit faster than wazero, and supports all the important build targets. Also doesn't suffer from tetratelabs/wazero#1818 Note on [wasmtime-go](https://github.com/bytecodealliance/wasmtime-go): > This Go library uses CGO to consume the C API of the [Wasmtime project](https://github.com/bytecodealliance/wasmtime) which is written in Rust. Precompiled binaries of Wasmtime are checked into this repository on tagged releases so you won't have to install Wasmtime locally, but it means that this project only works on Linux x86_64, macOS x86_64 , and Windows x86_64 currently. Building on other platforms will need to arrange to build Wasmtime and use CGO_* env vars to compile correctly. This is different to wazero, which as a pure Go project supports pretty much anything Go does without messing about.
Relevant issue(s)
Resolves #2029
Description
Switches LensVM to the wasmtime runtime.
Should be a fair bit faster than wazero, and supports all the important build targets. Also doesn't suffer from tetratelabs/wazero#1818
Note on wasmtime-go:
This is different to wazero, which as a pure Go project supports pretty much anything Go does without messing about.
Note: I had to change a test module, the new Lens version has closed a memory leak upon which the defra test module was relying on.
Todo
How has this been tested?
Specify the platform(s) on which this was tested: