Skip to content

Commit

Permalink
Merge pull request #107 from second-state/feat/support_rust_async
Browse files Browse the repository at this point in the history
support rust async && support https client
  • Loading branch information
L-jasmine authored Dec 11, 2023
2 parents 368c0bd + 4afed44 commit f4a4f88
Show file tree
Hide file tree
Showing 25 changed files with 1,738 additions and 2,709 deletions.
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/$VERSION/WasmEdge-plugin-wasmedge_rustls-$VERSION-ubuntu20.04_x86_64.tar.gz
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
run: |
cargo test test_fs --target=wasm32-wasi --release
Expand Down
Loading

0 comments on commit f4a4f88

Please sign in to comment.