Skip to content

WASM module built through Proxy-wasm RUST SDK can't be loaded due to missing imports: due to a missing import: __wbindgen_externref_xform__.__wbindgen_externref_table_grow #35

@marklu2018

Description

@marklu2018

Reproduce steps:

  1. Git clone the following WASM/RUST sample project:
    https://github.com/otomato-gh/proxy-wasm-rust

  2. In the Cargo.toml file, add a 'reqwest' depedency
    [dependencies]
    reqwest = { version = "0.10" }

  3. In src/lib.rs file, add:
    use reqwest::Client;

and in the on_http_request_headers(...) method body:
let _client = Client::new();

  1. Build WASM using:
    cargo build --target=wasm32-unknown-unknown --release

  2. Start Istio-proxy using docker-compose:
    docker-compose up --build

You will see the following error complaining:
[2020-08-21 18:49:31.113][6][critical][main] [external/envoy/source/server/server.cc:98] error initializing configuration '/etc/envoy.yaml': Failed to load WASM module due to a missing import: __wbindgen_externref_xform__.__wbindgen_externref_table_grow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions