WasmEdge / wasmedge-db-examples

Lightweight database clients in the WasmEdge Runtime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instantiation error when running mysql_async example

sunng87 opened this issue · comments

I'm getting this error when running mysql_async example using wasmedge target/.... It has something to do with TLS as from the information.

❯ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `wasmedge target/wasm32-wasi/debug/crud.wasm`
[2023-11-14 02:55:33.510] [error] instantiation failed: unknown import, Code: 0x62
[2023-11-14 02:55:33.510] [error]     When linking module: "rustls_client" , function name: "new_codec"
[2023-11-14 02:55:33.510] [error]     At AST node: import description
[2023-11-14 02:55:33.510] [error]     At AST node: import section
[2023-11-14 02:55:33.510] [error]     At AST node: module

Sorry, the example demonstrate how to make a TLS connection to a remote database. You will need to install the WasmEdge TLS plugin to make it work.

Our installer still has an issue with the TLS plugin, but you can install by hand following the steps in the CI.

https://github.com/WasmEdge/wasmedge-db-examples/blob/main/.github/workflows/examples.yml

Lines 77-84 install WasmEdge with the TLS plugin

Thanks.

Thank you! I think we will need to update README for that.

Updated the README and the GitHub Action script.

You can now install WasmEdge and the TLS plugin in a single line.