Comments (2)
Hey @jeremybaumont,
Thanks for giving it a try!
Apparently, the error message is misleading.
When I run this example with the logging level set to trace
, I see the following output:
getenvoy extension run --envoy-options '--component-log-level wasm:trace'
...
[debug][wasm] [bazel-out/darwin-opt/bin/external/envoy/source/extensions/common/wasm/_virtual_includes/wasm_hdr/extensions/common/wasm/wasm_vm.h:45] WasmVm created envoy.wasm.runtime.v8 now active
[debug][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:106] Base Wasm created 1 now active
[trace][wasm] [external/envoy/source/extensions/common/wasm/wasm_vm.cc:23] Failed to load Wasm module due to a missing import: __wbindgen_placeholder__.__wbindgen_describe
[trace][wasm] [external/envoy/source/extensions/common/wasm/wasm_vm.cc:23] Failed to load Wasm module due to a missing import: __wbindgen_externref_xform__.__wbindgen_externref_table_grow
[trace][wasm] [external/envoy/source/extensions/common/wasm/wasm_vm.cc:23] Failed to load Wasm module due to a missing import: __wbindgen_externref_xform__.__wbindgen_externref_table_set_null
[trace][wasm] [external/envoy/source/extensions/common/wasm/wasm_vm.cc:23] Failed to load Wasm module due to a missing import: __wbindgen_placeholder__.__wbindgen_throw
[error][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:123] Wasm VM failed Wasm missing malloc
[error][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:123] Wasm VM failed Failed to initialize Wasm code
[debug][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:164] ~Wasm 0 remaining active
[debug][wasm] [bazel-out/darwin-opt/bin/external/envoy/source/extensions/common/wasm/_virtual_includes/wasm_hdr/extensions/common/wasm/wasm_vm.h:49] ~WasmVm envoy.wasm.runtime.v8 0 remaining active
[trace][wasm] [external/envoy/source/extensions/common/wasm/wasm.cc:360] Unable to create Wasm
[critical][main] [external/envoy/source/server/server.cc:101] error initializing configuration '/private/var/folders/zq/dxlbtftx6bd2rfdgs2l6fhc00000gn/T/getenvoy_extension_run284847362/envoy.tmpl.yaml': Unable to create Wasm HTTP filter me.filters.http.envoy_digest_header_filter
[info][main] [external/envoy/source/server/server.cc:704] exiting
Unable to create Wasm HTTP filter me.filters.http.envoy_digest_header_filter
Notice error messages Failed to load Wasm module due to a missing import: __wbindgen_ ...
As far as I can see, you've added dependency on ring v0.16.15
which transitively brings in dependency on wasm-bindgen v0.2.68
.
cargo tree --target wasm32-unknown-unknown
...
│ ├── ring v0.16.15
│ │ ├── untrusted v0.7.1
│ │ └── web-sys v0.3.45
│ │ ├── js-sys v0.3.45
│ │ │ └── wasm-bindgen v0.2.68
│ │ │ ├── cfg-if v0.1.10
│ │ │ └── wasm-bindgen-macro v0.2.68
│ │ │ ├── quote v1.0.7
│ │ │ │ └── proc-macro2 v1.0.24
│ │ │ │ └── unicode-xid v0.2.1
│ │ │ └── wasm-bindgen-macro-support v0.2.68
│ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ ├── quote v1.0.7 (*)
│ │ │ ├── syn v1.0.45
│ │ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ │ ├── quote v1.0.7 (*)
│ │ │ │ └── unicode-xid v0.2.1
│ │ │ ├── wasm-bindgen-backend v0.2.68
│ │ │ │ ├── bumpalo v3.4.0
│ │ │ │ ├── lazy_static v1.4.0
│ │ │ │ ├── log v0.4.11
│ │ │ │ │ └── cfg-if v0.1.10
│ │ │ │ ├── proc-macro2 v1.0.24 (*)
│ │ │ │ ├── quote v1.0.7 (*)
│ │ │ │ ├── syn v1.0.45 (*)
│ │ │ │ └── wasm-bindgen-shared v0.2.68
│ │ │ └── wasm-bindgen-shared v0.2.68
│ │ └── wasm-bindgen v0.2.68 (*)
│ │ [build-dependencies]
│ │ └── cc v1.0.61
wasm-bindgen is meant for a browser environment. It relies on __wbindgen_ ...
functions provided by the host environment, which is not the case for Envoy
.
I don't know why ring v0.16.15
needs wasm-bindgen
. I would suggest to check documentation of that library whether wasm-bindgen
is optional.
from envoy-wasm-rust-sdk.
Thanks, I understand. I got ride off ring crate, and it works fine now. Thanks for the quick answer 😄
from envoy-wasm-rust-sdk.
Related Issues (20)
- introduce new extension type - `Bootstrap Extension`
- include the list of supported properties into `Stream Info API`
- Rust doesn't support stack unwinding on `wasm32` arch
- make use of `wee_alloc` optional HOT 1
- `proxy-wasm` spec should provide ABI for closing a downstream connection
- provide support for manually creating backtrace of an error
- Create testing framework for Rust extensions (Sprint August 14)
- Implement strongly-typed `StreamInfo` API in Rust SDK (Sprint August 14)
- Introduce `HeaderValue` concept into Rust SDK instead of `String` (Sprint August 14)
- upgrade Rust SDK to support new Envoy release
- prepare proposal on how to use Protobuf/gRPC in Rust SDK HOT 1
- introduce `ByteString` into Rust SDK
- Create testing framework for Rust extensions (Sprint August 31)
- Introduce `HeaderValue` concept into Rust SDK instead of `String` (Sprint August 31)
- Implement strongly-typed `StreamInfo` API in Rust SDK (Sprint August 31)
- Use the official rust-sdk as dependency
- Filter blocked after a request HOT 1
- Envoy 1.17: update `host::stream_info` module with changes in Envoy 1.17
- Archive this repository HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envoy-wasm-rust-sdk.