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

support rust async && support https client #107

Merged
merged 11 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
target="wasm32-wasi"
rustflags="-C target-feature=+bulk-memory"
target = "wasm32-wasi"
rustflags = "-C target-feature=+bulk-memory"

[target.wasm32-wasi]
runner="wasmedge --dir=.:. "
runner = "wasmedge --dir=.:. "
25 changes: 13 additions & 12 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ jobs:

- name: Install WasmEdge
run: |
VERSION=0.11.2
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -e all --version=$VERSION --tf-version=$VERSION --tf-deps-version=$VERSION --tf-tools-version=$VERSION --image-version=$VERSION -p /usr/local
curl -sLO https://github.com/WasmEdge/WasmEdge/releases/download/0.12.0-alpha.1/WasmEdge-plugin-wasi_nn-tensorflowlite-0.12.0-alpha.1-ubuntu20.04_x86_64.tar.gz
tar -zxf WasmEdge-plugin-wasi_nn-tensorflowlite-*-ubuntu20.04_x86_64.tar.gz
rm -f WasmEdge-plugin-wasi_nn-tensorflowlite-*-ubuntu20.04_x86_64.tar.gz
sudo mv libwasmedgePluginWasiNN.so /usr/local/lib/wasmedge/
VERSION=0.13.4
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -e all --version=$VERSION --plugins=wasi_nn-tensorflowlite -p /usr/local
wget https://github.com/WasmEdge/WasmEdge/releases/download/0.13.4/WasmEdge-plugin-wasmedge_rustls-$VERSION-ubuntu20.04_x86_64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use $VERSION instead of the hardcoded version string here?

sudo chmod +x /usr/local/lib/wasmedge

tar -zxf WasmEdge-plugin-wasmedge_rustls-*-ubuntu20.04_x86_64.tar.gz
sudo mv libwasmedge_rustls.so /usr/local/lib/wasmedge/

- uses: actions/setup-node@v2
with:
Expand Down Expand Up @@ -74,6 +75,11 @@ jobs:
cargo build --target wasm32-wasi --release
wasmedge --dir .:. target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/wasi_http_echo.js &

- name: Https fetch example
run: |
cargo build --target wasm32-wasi --release
wasmedge --dir .:. target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/wasi_https_fetch.js

- name: ES6 module
run: |
cargo build --target wasm32-wasi --release
Expand Down Expand Up @@ -152,11 +158,6 @@ jobs:
resp=$(curl http://localhost:8003)
echo "$resp"

- name: Tensorflow example
run: |
cargo build --target wasm32-wasi --release --features=tensorflow
wasmedge-tensorflow-lite --dir .:. target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/tensorflow_lite_demo/main.js

- name: WASI-NN example (TensorflowLite)
run: |
cargo build --target wasm32-wasi --release --features=wasi_nn
Expand Down Expand Up @@ -186,7 +187,7 @@ jobs:
wasmedge --dir .:. target/wasm32-wasi/release/examples/js_extend.wasm

- name: Node fs module test
#timeout-minutes: 10
timeout-minutes: 60
juntao marked this conversation as resolved.
Show resolved Hide resolved
run: |
cargo test test_fs --target=wasm32-wasi --release

Expand Down
Loading
Loading