wasmedgeを使ってHTTPSでリクエストするwasmを出力する
下準備
wasm32-wasi のインストール
code:shell
rustup target add wasm32-wasi
wasmedgeのインストール
code:shell
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash
ref: https://wasmedge.org/docs/start/install/
TLSプラグイン入れる
code:shell
curl -LO https://github.com/WasmEdge/WasmEdge/releases/download/0.13.4/WasmEdge-plugin-wasmedge_rustls-0.13.4-manylinux2014_x86_64.tar.gz
tar xf ./WasmEdge-plugin-wasmedge_rustls-0.13.4-manylinux2014_x86_64.tar.gz
mv libwasmedge_rustls.so ~/.wasmedge/plugin/
ref: https://wasmedge.org/docs/start/install#tls-plug-in
ちなみに wasmedge_httpsreq はdeprecatedになってる
doc
https://wasmedge.org/docs/develop/rust/http_service/client/#the-hyper-api
このexampleを見る
https://github.com/WasmEdge/wasmedge_hyper_demo
https://github.com/second-state/http_req
Misc
https://github.com/vasilev/HTTP-request-from-inside-WASM