Skip to content
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

Add wasmtime #6

Merged
merged 5 commits into from
May 4, 2021
Merged

Add wasmtime #6

merged 5 commits into from
May 4, 2021

Conversation

hayasshi
Copy link
Owner

@hayasshi hayasshi commented May 1, 2021

目的

HTTP request に応じて、WASM を実行し、結果を取得したい。

やったこと

WASM の生成

  • lib type WASM
  • lib type WASM (WebAssembly Interface Types のもの 参照)

HTTP リクエスト処理中での WASM 実行(関数呼び出し)

  • wasmtime API から WASM 関数呼び出し
  • wasmtime API から WASM WebAssembly Interface Types 経由の関数を呼び出し
    • Interface types の呼び出しはエラーとなる。実行時に下記のようなエラーメッセージが表示される。
thread 'actix-rt:worker:0' panicked at 'called `Result::unwrap()` on an `Err` value: WebAssembly failed to compile
Caused by:
0: WebAssembly translation error
1: Unsupported feature: Support for interface types has temporarily been removed from `wasmtime`.
   For more information about this temoprary you can read on the issue online:
       https://github.com/bytecodealliance/wasmtime/issues/1271
   and for re-adding support for interface types you can see this issue:
       https://github.com/bytecodealliance/wasmtime/issues/677
   ', src/main.rs:12:68
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

次にやろうとしていること

@hayasshi hayasshi merged commit a947fa1 into main May 4, 2021
@hayasshi hayasshi deleted the add-wasmtime branch May 4, 2021 13:59
@hayasshi hayasshi mentioned this pull request May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant