-
Notifications
You must be signed in to change notification settings - Fork 86
Use Emscripten with STANDALONE_WASM=1. #260
Conversation
This PR is a bit overloaded and includes a lot of changes, but it would be impossible to split them up: 1. Emscripten: update to 1.38.48. 2. Emscripten: use "upstream" instead of "fastcomp". 3. Emscripten: use STANDALONE_WASM=1. 4. Emscripten: use __wasm_global_ctors. 5. Emscripten: use WASI calls. 6. Emscripten: drop underscore prefix. 7. Emscripten: remove support for the JavaScript-flavored Emscripten. 8. Runtimes: throw WasmException for function call errors. 9. Tests: catch DivByZero (which is now an runtime error). 10. Tests: drop SEGV test, since it's compiled to "unreachable" call. 11. WAVM: update to 2019-10-15. 12. SDK: distribute static libraries instead of the bytecode. Fixes envoyproxy#77, envoyproxy#212. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@AndrewScheidecker WAVM isn't running as part of CI, so you cannot see it here, but when updating it from 2019-10-01 (WAVM/WAVM@6146b4e) to 2019-10-15 (WAVM/WAVM@1ec06cd), one of our tests started failing because I've tried changing existing code:
to clone the context instead, i.e.:
but that didn't make any difference. I've looked at all the commits, but nothing obvious jumps out... any ideas? cc @jplevyak |
I think what must be happening is:
I should perhaps get rid of the
However, I am wondering if you need the |
That's an excellent question! We don't need it anymore, and removing it fixes the issue. Thanks a lot! |
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
1142581
to
cc62b9a
Compare
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
# basics | ||
export DEBIAN_FRONTEND=noninteractive | ||
apt-get update | ||
apt-get upgrade -y | ||
apt-get install -y --no-install-recommends apt-utils ca-certificates | ||
apt-get autoremove -y | ||
apt-get clean | ||
apt-get install -y --no-install-recommends software-properties-common apt-transport-https git wget curl libglib2.0-dev autoconf autotools-dev automake libtool cmake python | ||
apt-get install -y --no-install-recommends software-properties-common apt-transport-https git wget curl pkg-config autoconf autotools-dev automake libtool cmake python zlib1g-dev |
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.
Just curious what caused these changes?
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 removed libglib2.0-dev
which wasn't necessary (it used to be needed by V8, but it's not anymore, and I'm not sure why it was here in the first place), so I had to add pkg-config
and zlib1g-dev
directly, since those are needed and were previously installed as transitive dependencies of libglib2.0-dev
.
@@ -29,8 +29,7 @@ struct NullVm : public WasmVm { | |||
bool cloneable() override { return true; }; | |||
WasmVmPtr clone() override; | |||
bool load(const std::string& code, bool allow_precompiled) override; | |||
void link(absl::string_view debug_name, bool needs_emscripten) override; | |||
void setMemoryLayout(uint64_t, uint64_t, uint64_t) override {} | |||
void link(absl::string_view debug_name) override; |
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.
We are going to have to upstream this.
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.
Yup, V8 isn't merged yet, so it's fine I think.
We don't need it anymore. Missed in envoyproxy#260. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
We don't need it anymore. Missed in #260. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Remove functions that are no longer needed. For details, see: - envoyproxy/envoy-wasm#260 - envoyproxy/envoy-wasm#262 - envoyproxy/envoy-wasm#263 - envoyproxy/envoy-wasm#268 Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Remove functions that are no longer needed. For details, see: - envoyproxy/envoy-wasm#260 - envoyproxy/envoy-wasm#262 - envoyproxy/envoy-wasm#263 - envoyproxy/envoy-wasm#268 Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: gargnupur <gargnupur@google.com>
This PR is a bit overloaded and includes a lot of changes,
but it would be impossible to split them up:
Fixes #77, #212.
Signed-off-by: Piotr Sikora piotrsikora@google.com