├── .cargo └── config.toml ├── .dockerignore ├── .github └── workflows │ └── examples.yml ├── .gitignore ├── Dockerfile ├── README.md ├── client-https ├── .cargo │ └── config.toml ├── Cargo.toml └── src │ └── main.rs ├── client ├── .cargo │ └── config ├── Cargo.toml ├── README.md └── src │ └── main.rs ├── docker-compose.yml ├── server-axum ├── .cargo │ └── config.toml ├── Cargo.toml ├── README.md └── src │ └── main.rs ├── server-tflite ├── .cargo │ └── config.toml ├── Cargo.toml ├── README.md ├── grace_hopper.jpg └── src │ ├── main.rs │ └── models │ ├── food │ ├── aiy_food_V1_labelmap.txt │ └── lite-model_aiy_vision_classifier_food_V1_1.tflite │ └── mobilenet_v1_1.0_224 │ ├── labels_mobilenet_quant_v1_224.txt │ └── mobilenet_v1_1.0_224_quant.tflite └── server ├── .cargo └── config.toml ├── Cargo.toml ├── README.md └── src └── main.rs /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target="wasm32-wasi" 3 | 4 | [target.wasm32-wasi] 5 | runner = "wasmedge" -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | docker-compose.yml 2 | client/target 3 | server/target 4 | -------------------------------------------------------------------------------- /.github/workflows/examples.yml: -------------------------------------------------------------------------------- 1 | name: examples 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | logLevel: 7 | description: 'Log level' 8 | required: true 9 | default: 'info' 10 | push: 11 | branches: [ main ] 12 | pull_request: 13 | branches: [ main ] 14 | 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-20.04 19 | 20 | steps: 21 | - uses: actions/checkout@v2 22 | 23 | - name: Install apt-get packages 24 | run: | 25 | echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc 26 | sudo ACCEPT_EULA=Y apt-get update 27 | sudo ACCEPT_EULA=Y apt-get upgrade 28 | sudo apt-get install wget git curl software-properties-common build-essential 29 | 30 | - name: Install Rust target for wasm 31 | run: | 32 | rustup target add wasm32-wasi 33 | 34 | - name: Install WasmEdge 35 | run: | 36 | VERSION=0.13.5 37 | TFVERSION=2.12.0 38 | curl -s -L -O --remote-name-all https://github.com/second-state/WasmEdge-tensorflow-deps/releases/download/TF-2.12.0-CC/WasmEdge-tensorflow-deps-TFLite-TF-$TFVERSION-CC-manylinux2014_x86_64.tar.gz 39 | tar -zxf WasmEdge-tensorflow-deps-TFLite-TF-$TFVERSION-CC-manylinux2014_x86_64.tar.gz 40 | rm -f WasmEdge-tensorflow-deps-TFLite-TF-$TFVERSION-CC-manylinux2014_x86_64.tar.gz 41 | sudo mv libtensorflowlite_c.so /usr/local/lib 42 | sudo mv libtensorflowlite_flex.so /usr/local/lib 43 | curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -v $VERSION --plugins wasi_nn-tensorflowlite -p /usr/local 44 | wget https://github.com/WasmEdge/WasmEdge/releases/download/0.13.4/WasmEdge-plugin-wasmedge_rustls-0.13.4-ubuntu20.04_x86_64.tar.gz 45 | tar -zxf WasmEdge-plugin-wasmedge_rustls-0.13.4-ubuntu20.04_x86_64.tar.gz 46 | sudo mv libwasmedge_rustls.so /usr/local/lib/wasmedge 47 | 48 | - name: Client https example 49 | run: | 50 | cd client-https 51 | cargo build --target wasm32-wasi --release 52 | wasmedgec target/wasm32-wasi/release/wasmedge_hyper_client_https.wasm wasmedge_hyper_client_https.wasm 53 | resp=$(wasmedge wasmedge_hyper_client_https.wasm) 54 | echo "$resp" 55 | if [[ $resp == *"WasmEdge"* ]]; then 56 | echo -e "Execution Success!" 57 | else 58 | echo -e "Execution Fail!" 59 | exit 1 60 | fi 61 | 62 | - name: Server example 63 | run: | 64 | cd server 65 | cargo build --target wasm32-wasi --release 66 | wasmedgec target/wasm32-wasi/release/wasmedge_hyper_server.wasm wasmedge_hyper_server.wasm 67 | nohup wasmedge wasmedge_hyper_server.wasm & 68 | echo $! > wasmedge.pid 69 | sleep 15 70 | resp=$(curl http://localhost:8080/echo -X POST -d "WasmEdge") 71 | echo "$resp" 72 | kill -9 `cat wasmedge.pid` 73 | rm wasmedge.pid 74 | if [[ $resp == *"WasmEdge"* ]]; then 75 | echo -e "Execution Success!" 76 | else 77 | echo -e "Execution Fail!" 78 | exit 1 79 | fi 80 | 81 | - name: Axum example 82 | run: | 83 | cd server-axum 84 | cargo build --target wasm32-wasi --release 85 | wasmedgec target/wasm32-wasi/release/wasmedge_axum_server.wasm wasmedge_axum_server.wasm 86 | nohup wasmedge wasmedge_axum_server.wasm & 87 | echo $! > wasmedge.pid 88 | sleep 15 89 | resp=$(curl http://localhost:8080/echo -X POST -d "WasmEdge") 90 | echo "$resp" 91 | kill -9 `cat wasmedge.pid` 92 | rm wasmedge.pid 93 | if [[ $resp == *"WasmEdge"* ]]; then 94 | echo -e "Execution Success!" 95 | else 96 | echo -e "Execution Fail!" 97 | exit 1 98 | fi 99 | 100 | - name: TFLite Server example 101 | run: | 102 | cd server-tflite 103 | cargo build --target wasm32-wasi --release 104 | wasmedgec target/wasm32-wasi/release/wasmedge_hyper_server_tflite.wasm wasmedge_hyper_server_tflite.wasm 105 | nohup wasmedge wasmedge_hyper_server_tflite.wasm & 106 | echo $! > wasmedge.pid 107 | sleep 15 108 | resp=$(curl http://localhost:8080/classify -X POST --data-binary "@grace_hopper.jpg") 109 | echo "$resp" 110 | kill -9 `cat wasmedge.pid` 111 | rm wasmedge.pid 112 | if [[ $resp == *"uniform"* ]]; then 113 | echo -e "Execution Success!" 114 | else 115 | echo -e "Execution Fail!" 116 | exit 1 117 | fi 118 | 119 | - name: Client example 120 | run: | 121 | cd client 122 | cargo build --target wasm32-wasi --release 123 | wasmedgec target/wasm32-wasi/release/wasmedge_hyper_client.wasm wasmedge_hyper_client.wasm 124 | resp=$(wasmedge wasmedge_hyper_client.wasm) 125 | echo "$resp" 126 | if [[ $resp == *"WasmEdge"* ]]; then 127 | echo -e "Execution Success!" 128 | else 129 | echo -e "Execution Fail!" 130 | exit 1 131 | fi 132 | 133 | - name: Client HTTPS example 134 | run: | 135 | cd client-https 136 | cargo build --target wasm32-wasi --release 137 | wasmedge compile target/wasm32-wasi/release/wasmedge_hyper_client_https.wasm wasmedge_hyper_client_https.wasm 138 | resp=$(wasmedge wasmedge_hyper_client_https.wasm) 139 | echo "$resp" 140 | if [[ $resp == *"WasmEdge"* ]]; then 141 | echo -e "Execution Success!" 142 | else 143 | echo -e "Execution Fail!" 144 | exit 1 145 | fi 146 | 147 | 148 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | */target -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM --platform=$BUILDPLATFORM rust:1.64 AS buildbase 2 | RUN rustup target add wasm32-wasi 3 | WORKDIR /src 4 | 5 | FROM --platform=$BUILDPLATFORM buildbase AS buildclient 6 | COPY client/ /src 7 | RUN --mount=type=cache,target=/usr/local/cargo/git/db \ 8 | --mount=type=cache,target=/usr/local/cargo/registry/cache \ 9 | --mount=type=cache,target=/usr/local/cargo/registry/index \ 10 | RUSTFLAGS="--cfg wasmedge --cfg tokio_unstable" cargo build --target wasm32-wasi --release 11 | 12 | FROM --platform=$BUILDPLATFORM buildbase AS buildserver 13 | COPY server/ /src 14 | RUN --mount=type=cache,target=/usr/local/cargo/git/db \ 15 | --mount=type=cache,target=/usr/local/cargo/registry/cache \ 16 | --mount=type=cache,target=/usr/local/cargo/registry/index \ 17 | RUSTFLAGS="--cfg wasmedge --cfg tokio_unstable" cargo build --target wasm32-wasi --release 18 | 19 | FROM --platform=$BUILDPLATFORM buildbase AS buildserverwarp 20 | COPY server-axum/ /src 21 | RUN --mount=type=cache,target=/usr/local/cargo/git/db \ 22 | --mount=type=cache,target=/usr/local/cargo/registry/cache \ 23 | --mount=type=cache,target=/usr/local/cargo/registry/index \ 24 | RUSTFLAGS="--cfg wasmedge --cfg tokio_unstable" cargo build --target wasm32-wasi --release 25 | 26 | FROM scratch AS client 27 | ENTRYPOINT [ "wasmedge_hyper_client.wasm" ] 28 | COPY --link --from=buildclient /src/target/wasm32-wasi/release/wasmedge_hyper_client.wasm wasmedge_hyper_client.wasm 29 | 30 | FROM scratch AS server 31 | ENTRYPOINT [ "wasmedge_hyper_server.wasm" ] 32 | COPY --link --from=buildserver /src/target/wasm32-wasi/release/wasmedge_hyper_server.wasm wasmedge_hyper_server.wasm 33 | 34 | FROM scratch AS server-warp 35 | ENTRYPOINT [ "wasmedge_warp_server.wasm" ] 36 | COPY --link --from=buildserverwarp /src/target/wasm32-wasi/release/wasmedge_axum_server.wasm wasmedge_axum_server.wasm 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WasmEdge Hyper Demo 2 | 3 | In this project, we demonstrate how to use **hyper** and **tokio** to build async http client in WebAssembly and execute it using [WasmEdge](https://github.com/WasmEdge/WasmEdge). 4 | 5 | ## Why tokio in WasmEdge? 6 | 7 | There are growing demands to perform network requests in WASM and cloud computing. But it would be inefficient to perform network requests synchronously so we need async in WASM. 8 | 9 | As tokio is widely accepted, we can bring many projects that depend on tokio to WASM if we can port tokio into WASM. After that, the developers can have async functions in WASM as well as efficient programs. 10 | 11 | With the help of tokio support of WasmEdge, the developers can compile the projects that use tokio into WASM and execute it using WasmEdge. 12 | 13 | ## Quickstart with Docker 14 | 15 | The easiest way to get started is to use a version of Docker Desktop or Docker CLI with Wasm support. 16 | 17 | * [Install Docker Desktop + Wasm (Beta)](https://docs.docker.com/desktop/wasm/) 18 | * [Install Docker CLI + Wasm](https://github.com/chris-crone/wasm-day-na-22/tree/main/server) 19 | 20 | Build all the examples using Docker. There is no need to install Rust or WasmEdge here since Docker sets it all up for you. 21 | 22 | ```bash 23 | docker compose build 24 | ``` 25 | 26 | Then, you just need to type one command to run each example. 27 | 28 | ```bash 29 | # To run the HTTP client example 30 | $ docker compose run --no-TTY client 31 | ... ... 32 | 33 | # To run the HTTP server 34 | $ docker compose run --no-TTY -p 8080:8080 server 35 | ... ... 36 | # Test the HTTP server using curl 37 | $ curl http://localhost:8080/echo -X POST -d "WasmEdge" 38 | WasmEdge 39 | 40 | # To run the Warp HTTP server 41 | $ docker compose run --no-TTY -p 8080:8080 server-warp 42 | ... ... 43 | # Test the HTTP server using curl 44 | $ curl http://localhost:8080/echo -X POST -d "WasmEdge" 45 | WasmEdge 46 | 47 | ``` 48 | 49 | It runs both the client and server examples in this repo. See the [Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml) files. The [client example](client) will run and quit upon completion. The [server example](server) starts a server that listens for incoming HTTP requests, and you can interact with it through `curl`. 50 | 51 | However, if you want to build and run the examples step by step on your own system. Follow the detailed instructions below. 52 | 53 | ## Prerequisites 54 | 55 | We need install rust and wasm target first. 56 | 57 | ```bash 58 | # install rust 59 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 60 | source $HOME/.cargo/env 61 | 62 | # install wasm target 63 | rustup target add wasm32-wasi 64 | ``` 65 | 66 | Then install the WasmEdge. You will need `all` extensions to run the [HTTP server with Tensorflow](server-tflite/README.md) example. 67 | 68 | ```bash 69 | curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all 70 | source $HOME/.wasmedge/env 71 | ``` 72 | 73 | ## Add dependencies in **Cargo.toml** 74 | 75 | In this project, we add tokio and reqwest as dependencies. 76 | 77 | ```toml 78 | [dependencies] 79 | hyper_wasi = { version = "0.15", features = ["full"]} 80 | tokio_wasi = { version = "1", features = ["rt", "macros", "net", "time", "io-util"]} 81 | ``` 82 | 83 | ## Examples 84 | 85 | Details about the example apps are as below. 86 | 87 | * [HTTP client](client/README.md) 88 | * [HTTP server](server/README.md) 89 | * [HTTP server in warp framework](server-warp/README.md) 90 | * [HTTP server with Tensorflow](server-tflite/README.md) 91 | 92 | # FAQ 93 | 94 | ## use of unstable library feature 'wasi_ext' 95 | 96 | If you are using rustc 1.64, you may encounter this error. There are two options: 97 | 98 | 1. Update rustc to newer version. Validated versions are `1.65` and `1.59`. 99 | 2. Add `#![feature(wasi_ext)]` to the top of `mio/src/lib.rs`. 100 | -------------------------------------------------------------------------------- /client-https/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | rustflags = ["--cfg", "wasmedge", "--cfg", "tokio_unstable"] 4 | -------------------------------------------------------------------------------- /client-https/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasmedge_hyper_client_https" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | [patch.crates-io] 8 | tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" } 9 | # mio = { git = "https://github.com/second-state/wasi_mio.git", branch = "v0.8.x" } 10 | socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" } 11 | hyper = { git = "https://github.com/second-state/wasi_hyper.git", branch = "v0.14.x" } 12 | 13 | 14 | [dependencies] 15 | hyper = { version = "0.14", features = ["full"]} 16 | hyper-rustls = { version = "0.25", default-features = false, features = [ 17 | "http1", 18 | "tls12", 19 | "logging", 20 | "ring", 21 | "webpki-tokio", 22 | ] } 23 | 24 | tokio = { version = "1", features = ["rt", "macros", "net", "time", "io-util"]} 25 | pretty_env_logger = "0.4.0" 26 | 27 | rustls = { version = "0.22", default-features = false } 28 | webpki-roots = "0.26.1" 29 | -------------------------------------------------------------------------------- /client-https/src/main.rs: -------------------------------------------------------------------------------- 1 | use hyper::Client; 2 | 3 | type Result = std::result::Result>; 4 | 5 | #[tokio::main(flavor = "current_thread")] 6 | async fn main() { 7 | let url = "https://httpbin.org/get?msg=WasmEdge" 8 | .parse::() 9 | .unwrap(); 10 | fetch_https_url(url).await.unwrap(); 11 | } 12 | 13 | async fn fetch_https_url(url: hyper::Uri) -> Result<()> { 14 | // Prepare the TLS client config 15 | let mut root_store = rustls::RootCertStore::empty(); 16 | root_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned()); 17 | 18 | let tls = rustls::ClientConfig::builder() 19 | .with_root_certificates(root_store) 20 | .with_no_client_auth(); 21 | 22 | // Prepare the HTTPS connector 23 | let https = hyper_rustls::HttpsConnectorBuilder::new() 24 | .with_tls_config(tls) 25 | .https_or_http() 26 | .enable_http1() 27 | .build(); 28 | 29 | let client = Client::builder().build::<_, hyper::Body>(https); 30 | 31 | let res = client.get(url).await?; 32 | 33 | println!("Response: {}", res.status()); 34 | println!("Headers: {:#?}\n", res.headers()); 35 | 36 | let body = hyper::body::to_bytes(res.into_body()).await.unwrap(); 37 | println!("{}", String::from_utf8(body.into()).unwrap()); 38 | 39 | println!("\n\nDone!"); 40 | 41 | Ok(()) 42 | } 43 | -------------------------------------------------------------------------------- /client/.cargo/config: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | rustflags = ["--cfg", "wasmedge", "--cfg", "tokio_unstable"] 4 | -------------------------------------------------------------------------------- /client/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasmedge_hyper_client" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [patch.crates-io] 7 | tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" } 8 | socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" } 9 | hyper = { git = "https://github.com/second-state/wasi_hyper.git", branch = "v0.14.x" } 10 | 11 | [dependencies] 12 | hyper = { version = "0.14", features = ["full"] } 13 | tokio = { version = "1", features = [ 14 | "rt", 15 | "macros", 16 | "net", 17 | "time", 18 | "io-util", 19 | ] } 20 | pretty_env_logger = "0.4.0" 21 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # HTTP client example 2 | 3 | ## Quickstart with Docker 4 | 5 | With an WASI-enabled Docker, you just need one line of command to build and run the HTTP client example. For details, refer to the [Dockerfile](../Dockerfile) and [docker-compose.yml](../docker-compose.yml) files. 6 | 7 | ```bash 8 | docker compose build 9 | docker compose run --no-TTY client 10 | ``` 11 | 12 | If you want to build and run the application step by step on your own system, read on. 13 | 14 | ## Build 15 | 16 | ```bash 17 | cargo build --target wasm32-wasi --release 18 | ``` 19 | 20 | ## Run 21 | 22 | ```bash 23 | $ wasmedge target/wasm32-wasi/release/wasmedge_hyper_client.wasm 24 | 25 | GET as byte stream: http://eu.httpbin.org/get?msg=Hello 26 | Response: 200 OK 27 | Headers: { 28 | "date": "Mon, 26 Sep 2022 02:44:18 GMT", 29 | "content-type": "application/json", 30 | "content-length": "236", 31 | "connection": "keep-alive", 32 | "server": "gunicorn/19.9.0", 33 | "access-control-allow-origin": "*", 34 | "access-control-allow-credentials": "true", 35 | } 36 | 37 | b"{\n \"args\": {\n \"msg\": \"Hello\"\n }, \n \"headers\": {\n \"Host\": \"eu.httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63311202-67b10bb4094002892eeb9a51\"\n }, \n \"origin\": \"13.87.135.123\", \n \"url\": \"http://eu.httpbin.org/get?msg=Hello\"\n}\n" 38 | 39 | GET and get result as string: http://eu.httpbin.org/get?msg=WasmEdge 40 | { 41 | "args": { 42 | "msg": "WasmEdge" 43 | }, 44 | "headers": { 45 | "Host": "eu.httpbin.org", 46 | "X-Amzn-Trace-Id": "Root=1-63311202-548ac9433669e7112347fbda" 47 | }, 48 | "origin": "13.87.135.123", 49 | "url": "http://eu.httpbin.org/get?msg=WasmEdge" 50 | } 51 | 52 | 53 | POST and get result as string: http://eu.httpbin.org/post 54 | with a POST body: hello wasmedge 55 | { 56 | "args": {}, 57 | "data": "hello wasmedge", 58 | "files": {}, 59 | "form": {}, 60 | "headers": { 61 | "Content-Length": "14", 62 | "Host": "eu.httpbin.org", 63 | "X-Amzn-Trace-Id": "Root=1-63311202-3b0eb3ee1cb609f63db9dcb5" 64 | }, 65 | "json": null, 66 | "origin": "13.87.135.123", 67 | "url": "http://eu.httpbin.org/post" 68 | } 69 | ``` 70 | 71 | -------------------------------------------------------------------------------- /client/src/main.rs: -------------------------------------------------------------------------------- 1 | #![deny(warnings)] 2 | #![warn(rust_2018_idioms)] 3 | use hyper::{body::HttpBody as _, Client}; 4 | use hyper::{Body, Method, Request}; 5 | // use tokio::io::{self, AsyncWriteExt as _}; 6 | 7 | // A simple type alias so as to DRY. 8 | type Result = std::result::Result>; 9 | 10 | #[tokio::main(flavor = "current_thread")] 11 | async fn main() -> Result<()> { 12 | pretty_env_logger::init(); 13 | 14 | let url_str = "http://eu.httpbin.org/get?msg=Hello"; 15 | println!("\nGET as byte stream: {}", url_str); 16 | let url = url_str.parse::().unwrap(); 17 | if url.scheme_str() != Some("http") { 18 | println!("This example only works with 'http' URLs."); 19 | return Ok(()); 20 | } 21 | fetch_url(url).await?; 22 | // tokio::time::sleep(std::time::Duration::from_secs(5)).await; 23 | 24 | let url_str = "http://eu.httpbin.org/get?msg=WasmEdge"; 25 | println!("\nGET and get result as string: {}", url_str); 26 | let url = url_str.parse::().unwrap(); 27 | fetch_url_return_str(url).await?; 28 | // tokio::time::sleep(std::time::Duration::from_secs(5)).await; 29 | 30 | let url_str = "http://eu.httpbin.org/post"; 31 | let post_body_str = "hello wasmedge"; 32 | println!("\nPOST and get result as string: {}", url_str); 33 | println!("with a POST body: {}", post_body_str); 34 | let url = url_str.parse::().unwrap(); 35 | post_url_return_str(url, post_body_str.as_bytes()).await 36 | } 37 | 38 | async fn fetch_url(url: hyper::Uri) -> Result<()> { 39 | let client = Client::new(); 40 | let mut res = client.get(url).await?; 41 | 42 | println!("Response: {}", res.status()); 43 | println!("Headers: {:#?}\n", res.headers()); 44 | 45 | // Stream the body, writing each chunk to stdout as we get it 46 | // (instead of buffering and printing at the end). 47 | while let Some(next) = res.data().await { 48 | let chunk = next?; 49 | println!("{:#?}", chunk); 50 | // io::stdout().write_all(&chunk).await?; 51 | } 52 | 53 | Ok(()) 54 | } 55 | 56 | async fn fetch_url_return_str(url: hyper::Uri) -> Result<()> { 57 | let client = Client::new(); 58 | let mut res = client.get(url).await?; 59 | 60 | let mut resp_data = Vec::new(); 61 | while let Some(next) = res.data().await { 62 | let chunk = next?; 63 | resp_data.extend_from_slice(&chunk); 64 | } 65 | println!("{}", String::from_utf8_lossy(&resp_data)); 66 | 67 | Ok(()) 68 | } 69 | 70 | async fn post_url_return_str(url: hyper::Uri, post_body: &'static [u8]) -> Result<()> { 71 | let client = Client::new(); 72 | let req = Request::builder() 73 | .method(Method::POST) 74 | .uri(url) 75 | .body(Body::from(post_body))?; 76 | let mut res = client.request(req).await?; 77 | 78 | let mut resp_data = Vec::new(); 79 | while let Some(next) = res.data().await { 80 | let chunk = next?; 81 | resp_data.extend_from_slice(&chunk); 82 | } 83 | println!("{}", String::from_utf8_lossy(&resp_data)); 84 | 85 | Ok(()) 86 | } 87 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | server: # docker compose run --no-TTY -p 8080:8080 server 3 | image: demo-server 4 | platform: wasi/wasm 5 | build: 6 | context: . 7 | target: server 8 | runtime: io.containerd.wasmedge.v1 9 | ports: 10 | - 8080:8080 11 | server-warp: # docker compose run --no-TTY -p 8080:8080 server-axum 12 | image: demo-server-axum 13 | platform: wasi/wasm 14 | build: 15 | context: . 16 | target: server-axum 17 | runtime: io.containerd.wasmedge.v1 18 | ports: 19 | - 8080:8080 20 | client: # docker compose run --no-TTY client 21 | image: demo-client 22 | platform: wasi/wasm 23 | build: 24 | context: . 25 | target: client 26 | runtime: io.containerd.wasmedge.v1 27 | -------------------------------------------------------------------------------- /server-axum/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | rustflags = ["--cfg", "wasmedge", "--cfg", "tokio_unstable"] 4 | -------------------------------------------------------------------------------- /server-axum/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasmedge_axum_server" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [patch.crates-io] 7 | tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" } 8 | socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" } 9 | hyper = { git = "https://github.com/second-state/wasi_hyper.git", branch = "v0.14.x" } 10 | 11 | [dependencies] 12 | axum = "0.6" 13 | bytes = "1" 14 | futures-util = "0.3.30" 15 | tokio = { version = "1", features = ["rt", "macros", "net", "time", "io-util"]} 16 | -------------------------------------------------------------------------------- /server-axum/README.md: -------------------------------------------------------------------------------- 1 | # HTTP server example using the axum crate 2 | 3 | ## Build 4 | 5 | ```bash 6 | cargo build --target wasm32-wasi --release 7 | ``` 8 | 9 | ## Run 10 | 11 | ```bash 12 | wasmedge target/wasm32-wasi/release/wasmedge_axum_server.wasm 13 | ``` 14 | 15 | ## Test 16 | 17 | Run the following from another terminal. 18 | 19 | ```bash 20 | $ curl http://localhost:8080/ 21 | Try POSTing data to /echo such as: `curl localhost:8080/echo -XPOST -d 'hello world'` 22 | ``` 23 | 24 | ```bash 25 | $ curl http://localhost:8080/echo -X POST -d "WasmEdge" 26 | WasmEdge 27 | ``` 28 | -------------------------------------------------------------------------------- /server-axum/src/main.rs: -------------------------------------------------------------------------------- 1 | use bytes::Bytes; 2 | use futures_util::StreamExt; 3 | 4 | use axum::{extract::BodyStream, routing::get, routing::post, Router}; 5 | use tokio::net::TcpListener; 6 | 7 | #[tokio::main(flavor = "current_thread")] 8 | async fn main() { 9 | // build our application with a route 10 | let app = Router::new() 11 | .route("/", get(help)) 12 | .route("/echo", post(echo)); 13 | 14 | // run it 15 | let addr = "0.0.0.0:8080"; 16 | let tcp_listener = TcpListener::bind(addr).await.unwrap(); 17 | println!("listening on {}", addr); 18 | axum::Server::from_tcp(tcp_listener.into_std().unwrap()) 19 | .unwrap() 20 | .serve(app.into_make_service()) 21 | .await 22 | .unwrap(); 23 | } 24 | 25 | async fn help() -> &'static str { 26 | "Try POSTing data to /echo such as: `curl localhost:8080/echo -XPOST -d 'hello world'`\n" 27 | } 28 | 29 | async fn echo(mut stream: BodyStream) -> Bytes { 30 | if let Some(Ok(s)) = stream.next().await { 31 | s 32 | } else { 33 | Bytes::new() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /server-tflite/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | rustflags = ["--cfg", "wasmedge", "--cfg", "tokio_unstable"] 4 | -------------------------------------------------------------------------------- /server-tflite/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasmedge_hyper_server_tflite" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [patch.crates-io] 7 | tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" } 8 | socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" } 9 | hyper = { git = "https://github.com/second-state/wasi_hyper.git", branch = "v0.14.x" } 10 | 11 | [dependencies] 12 | hyper = { version = "0.14", features = ["full"]} 13 | tokio = { version = "1", features = ["rt", "macros", "net", "time", "io-util"]} 14 | image = { version = "0.23.14", default-features = false, features = ["gif", "jpeg", "ico", "png", "tiff", "webp", "bmp"] } 15 | wasi-nn = "0.4.0" 16 | anyhow = "1.0" 17 | -------------------------------------------------------------------------------- /server-tflite/README.md: -------------------------------------------------------------------------------- 1 | # TFLite server example 2 | 3 | ## Prequsites 4 | 5 | In order to run this example, you will first install WasmEdge with Tensorflow Lite plugin: 6 | 7 | ``` 8 | VERSION=0.13.1 9 | curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION --plugins wasi_nn-tensorflowlite 10 | ``` 11 | 12 | Then, install Tensorflow Lite dependency libraries: 13 | 14 | ``` 15 | VERSION=TF-2.12.0-CC 16 | curl -s -L -O --remote-name-all https://github.com/second-state/WasmEdge-tensorflow-deps/releases/download/$VERSION/WasmEdge-tensorflow-deps-TFLite-$VERSION-manylinux2014_x86_64.tar.gz 17 | tar -zxf WasmEdge-tensorflow-deps-TFLite-$VERSION-manylinux2014_x86_64.tar.gz 18 | rm -f WasmEdge-tensorflow-deps-TFLite-$VERSION-manylinux2014_x86_64.tar.gz 19 | 20 | mv libtensorflowlite_c.so ~/.wasmedge/lib 21 | mv libtensorflowlite_flex.so ~/.wasmedge/lib 22 | ``` 23 | 24 | ## Build 25 | 26 | ``` 27 | cargo build --target wasm32-wasi --release 28 | ``` 29 | 30 | ## Run 31 | 32 | ``` 33 | wasmedge target/wasm32-wasi/release/wasmedge_hyper_server_tflite.wasm 34 | ``` 35 | 36 | ## Test 37 | 38 | Run the following from another terminal. 39 | 40 | ``` 41 | $ curl http://localhost:8080/classify -X POST --data-binary "@grace_hopper.jpg" 42 | military uniform is detected with 206/255 confidence 43 | ``` 44 | -------------------------------------------------------------------------------- /server-tflite/grace_hopper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WasmEdge/wasmedge_hyper_demo/85db6e7c7d06e96786d8d364f5869d1860c3c026/server-tflite/grace_hopper.jpg -------------------------------------------------------------------------------- /server-tflite/src/main.rs: -------------------------------------------------------------------------------- 1 | use hyper::service::{make_service_fn, service_fn}; 2 | use hyper::{Body, Method, Request, Response, Server, StatusCode}; 3 | use image::io::Reader; 4 | use image::DynamicImage; 5 | use std::convert::Infallible; 6 | use std::io::Cursor; 7 | use std::net::SocketAddr; 8 | use std::result::Result; 9 | use tokio::net::TcpListener; 10 | use wasi_nn::{ExecutionTarget, GraphBuilder, GraphEncoding, TensorType}; 11 | 12 | /// This is our service handler. It receives a Request, routes on its 13 | /// path, and returns a Future of a Response. 14 | async fn classify(req: Request) -> Result, anyhow::Error> { 15 | let model_data: &[u8] = 16 | include_bytes!("models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite"); 17 | let labels = include_str!("models/mobilenet_v1_1.0_224/labels_mobilenet_quant_v1_224.txt"); 18 | let graph = GraphBuilder::new(GraphEncoding::TensorflowLite, ExecutionTarget::CPU) 19 | .build_from_bytes(&[model_data])?; 20 | let mut ctx = graph.init_execution_context()?; 21 | /* 22 | let graph = unsafe { 23 | wasi_nn::load( 24 | &[model_data], 25 | 4, // encoding for tflite: wasi_nn::GRAPH_ENCODING_TENSORFLOWLITE 26 | wasi_nn::EXECUTION_TARGET_CPU, 27 | ) 28 | .unwrap() 29 | }; 30 | let context = unsafe { wasi_nn::init_execution_context(graph).unwrap() }; 31 | */ 32 | 33 | match (req.method(), req.uri().path()) { 34 | // Serve some instructions at / 35 | (&Method::GET, "/") => Ok(Response::new(Body::from( 36 | "Try POSTing data to /classify such as: `curl http://localhost:3000/classify -X POST --data-binary '@grace_hopper.jpg'`", 37 | ))), 38 | 39 | (&Method::POST, "/classify") => { 40 | let buf = hyper::body::to_bytes(req.into_body()).await?; 41 | let tensor_data = image_to_tensor(&buf, 224, 224); 42 | ctx.set_input(0, TensorType::U8, &[1, 224, 224, 3], &tensor_data)?; 43 | /* 44 | let tensor = wasi_nn::Tensor { 45 | dimensions: &[1, 224, 224, 3], 46 | r#type: wasi_nn::TENSOR_TYPE_U8, 47 | data: &tensor_data, 48 | }; 49 | unsafe { 50 | wasi_nn::set_input(context, 0, tensor).unwrap(); 51 | } 52 | */ 53 | // Execute the inference. 54 | ctx.compute()?; 55 | /* 56 | unsafe { 57 | wasi_nn::compute(context).unwrap(); 58 | } 59 | */ 60 | // Retrieve the output. 61 | let mut output_buffer = vec![0u8; labels.lines().count()]; 62 | _ = ctx.get_output(0, &mut output_buffer)?; 63 | /* 64 | unsafe { 65 | wasi_nn::get_output( 66 | context, 67 | 0, 68 | &mut output_buffer[..] as *mut [u8] as *mut u8, 69 | output_buffer.len().try_into().unwrap(), 70 | ) 71 | .unwrap(); 72 | } 73 | */ 74 | // Sort the result with the highest probability result first 75 | let results = sort_results(&output_buffer); 76 | /* 77 | for r in results.iter() { 78 | println!("results: {} {}", r.0, r.1); 79 | } 80 | */ 81 | // The first result's first element points to the labels position 82 | let class_name = labels.lines().nth(results[0].0).unwrap_or("Unknown"); 83 | println!("result: {} {}", class_name, results[0].1); 84 | 85 | Ok(Response::new(Body::from(format!("{} is detected with {}/255 confidence", class_name, results[0].1)))) 86 | } 87 | 88 | // Return the 404 Not Found for other routes. 89 | _ => { 90 | let mut not_found = Response::default(); 91 | *not_found.status_mut() = StatusCode::NOT_FOUND; 92 | Ok(not_found) 93 | } 94 | } 95 | } 96 | 97 | #[tokio::main(flavor = "current_thread")] 98 | async fn main() -> Result<(), Box> { 99 | let addr = SocketAddr::from(([0, 0, 0, 0], 8080)); 100 | 101 | let listener = TcpListener::bind(addr).await?; 102 | 103 | let make_svc = 104 | make_service_fn( 105 | |_| async move { Ok::<_, Infallible>(service_fn(move |req| classify(req))) }, 106 | ); 107 | let server = Server::from_tcp(listener.into_std()?)?.serve(make_svc); 108 | if let Err(e) = server.await { 109 | eprintln!("server error: {}", e); 110 | } 111 | Ok(()) 112 | 113 | /* 114 | let addr = SocketAddr::from(([0, 0, 0, 0], 8080)); 115 | 116 | let listener = TcpListener::bind(addr).await?; 117 | println!("Listening on http://{}", addr); 118 | loop { 119 | let (stream, _) = listener.accept().await?; 120 | 121 | tokio::task::spawn(async move { 122 | if let Err(err) = Http::new().serve_connection(stream, service_fn(classify)).await { 123 | println!("Error serving connection: {:?}", err); 124 | } 125 | }); 126 | } 127 | */ 128 | } 129 | 130 | // Sort the buffer of probabilities. The graph places the match probability for each class at the 131 | // index for that class (e.g. the probability of class 42 is placed at buffer[42]). Here we convert 132 | // to a wrapping InferenceResult and sort the results. 133 | fn sort_results(buffer: &[u8]) -> Vec { 134 | let mut results: Vec = buffer 135 | .iter() 136 | .enumerate() 137 | .map(|(c, p)| InferenceResult(c, *p)) 138 | .collect(); 139 | results.sort_by(|a, b| b.1.partial_cmp(&a.1).unwrap()); 140 | results 141 | } 142 | 143 | // Take the image data, resize it to height x width, and then convert 144 | // the pixel precision to FP32. The resulting BGR pixel vector is then returned. 145 | fn image_to_tensor(raw_data: &[u8], height: u32, width: u32) -> Vec { 146 | let reader = Reader::new(Cursor::new(raw_data)) 147 | .with_guessed_format() 148 | .expect("Cursor io never fails"); 149 | let pixels = reader.decode().unwrap(); 150 | let dyn_img: DynamicImage = pixels.resize_exact(width, height, image::imageops::Triangle); 151 | let bgr_img = dyn_img.to_rgb8(); 152 | // Get an array of the pixel values 153 | let raw_u8_arr: &[u8] = &bgr_img.as_raw()[..]; 154 | return raw_u8_arr.to_vec(); 155 | } 156 | 157 | // A wrapper for class ID and match probabilities. 158 | #[derive(Debug, PartialEq)] 159 | struct InferenceResult(usize, u8); 160 | -------------------------------------------------------------------------------- /server-tflite/src/models/food/aiy_food_V1_labelmap.txt: -------------------------------------------------------------------------------- 1 | __background__ 2 | Chaudin 3 | Bambalouni 4 | Ghoriba 5 | Mango sticky rice 6 | Jianbing 7 | Aguachile 8 | Carrozza 9 | Miyan kuka 10 | Efo riro 11 | Ayam masak merah 12 | Chiffon pie 13 | /g/11b8_rxx4d 14 | Riso patate e cozze 15 | Bazin 16 | Black bottom pie 17 | Palóc soup 18 | Sailor sandwich 19 | Tuwo shinkafa 20 | Carne a la tampiqueña 21 | Pastel azteca 22 | Fujian red wine chicken 23 | Boeber 24 | Lady Baltimore cake 25 | Yam khai dao 26 | Texas Tommy 27 | Har cheong gai 28 | Kolokythopita 29 | Karydopita 30 | Rinflajš 31 | Hainanese curry rice 32 | Sonoran hot dog 33 | /g/11cfty6q3 34 | Afghani burger 35 | Teochew porridge 36 | Minestra di ceci 37 | Pastrami on rye 38 | Roast beef sandwich 39 | Chahan 40 | Ekuru 41 | Sciusceddu 42 | Breakfast burrito 43 | /g/11dyjj24g 44 | Sausage Stroganoff 45 | Roti jala 46 | Pirao 47 | Casatiello 48 | Khanom tan 49 | Muamba chicken 50 | Dobradinha 51 | Bruckfleisch 52 | Molote 53 | Spongata 54 | Funge 55 | /g/1212ghsj 56 | Köttbullar 57 | Ka'ak 58 | Papet vaudois 59 | /g/12148tdg 60 | Prosciutto di Norcia 61 | Malloreddus 62 | /g/1214g6v_ 63 | Pannenkoek 64 | Dirty macaroni 65 | /g/12175t2y 66 | Garlic butter shrimp 67 | Fricasse 68 | Stracciatella 69 | /g/121b74wr 70 | Sartù 71 | Matelote 72 | Baodu 73 | Mattentaart 74 | Cartellate 75 | Gyeran-ppang 76 | Torta Pasqualina 77 | Caltaboș 78 | Khanom mo kaeng 79 | Suimono 80 | Dimlama 81 | Tavë Kosi 82 | /g/121p63r3 83 | /g/121slhcd 84 | Kalach 85 | Jambon persillé 86 | Pork Bones 87 | Pozharsky cutlet 88 | Roccocò 89 | Feijão de óleo de palma 90 | Calulu 91 | Bey's Soup 92 | /g/1226mnbh 93 | Thịt kho tàu 94 | Bon bon chicken 95 | Zoque 96 | Bint al-sahn 97 | Tempoyak 98 | Puran poli 99 | /g/122m40vc 100 | Chueo-tang 101 | Naem 102 | /g/122qyvy7 103 | /g/122rd60t 104 | Pizokel 105 | /g/122vxtxs 106 | Schiacciata 107 | Daheen 108 | Chapssal-tteok 109 | /g/123267k_ 110 | Crescentina modenese 111 | Pansotti 112 | Fried eggplant 113 | Portuguese seafood rice 114 | Tripes à la mode de Caen 115 | /g/12353lp9 116 | Brenebon 117 | Gnocco fritto 118 | /g/12384pzv 119 | Tahu tek-tek 120 | Bibikkan 121 | Squid tongseng 122 | /g/12fgs6199 123 | Bundevara 124 | Sop saudara 125 | /g/155q8w2m 126 | Erbazzone 127 | Kisra 128 | Meat from tiblica 129 | /g/1hc0hhj4r 130 | Yufka 131 | Pisarei e faśö 132 | /g/1pznmr_ch 133 | Pampushka 134 | Makowiec 135 | Saleeg 136 | /m/0100fwt6 137 | Jókai bean soup 138 | Bookbinder soup 139 | Selat solo 140 | Kutsinta 141 | Sago soup 142 | Vinegret 143 | Shrimp and grits 144 | Sirop de Liège 145 | Woku 146 | Muhallebi 147 | Gepuk 148 | Fouée 149 | Octopus 150 | Koba 151 | Bò lúc lắc 152 | Squid lū'au 153 | Shrimp Louie 154 | Black pudding 155 | Cherry kebab 156 | Pitsi-pitsî 157 | Sabich salad 158 | Mie kocok 159 | Maraca pie 160 | Banga 161 | Baccalà alla lucana 162 | Nasi tumpang 163 | Gratin dauphinois 164 | Arroz chaufa 165 | Kuih 166 | Ayam goreng 167 | Chongos zamoranos 168 | /m/011c708 169 | Mămăligă 170 | Candied almonds 171 | Lasagne 172 | Pecel Lele 173 | Lettuce soup 174 | Acquacotta 175 | Pork blood soup 176 | /m/011sq8kg 177 | Buridda 178 | Maccu 179 | Turkey Devonshire 180 | Ginestrata 181 | Garmugia 182 | Meringue 183 | Peanut butter and jelly sandwich 184 | Couque de Dinant 185 | Omo tuo 186 | Thapthim krop 187 | Pie tee 188 | Sutarfeni 189 | Raclette 190 | Wotou 191 | Punugulu 192 | Succotash 193 | Chim chum 194 | Wachipa 195 | Boat noodles 196 | Tantuni 197 | Shab Deg 198 | Chả giò 199 | Ciabatta Bacon Cheeseburger 200 | Mie kangkung 201 | Tuwo masara 202 | Kokonte 203 | Akple 204 | /m/012vypzp 205 | Kwareżimal 206 | Bento 207 | Osechi 208 | Okonomiyaki 209 | Miso soup 210 | Dango 211 | Onigiri 212 | Hiyayakko 213 | Tempura 214 | Mochi 215 | Peppersoup 216 | Caldo de queso 217 | Dodo ikire 218 | Uirō 219 | Hong dou tang 220 | Kakigōri 221 | Khichu 222 | Bolo de arroz 223 | Chips and dip 224 | Murgh musallam 225 | Utica greens 226 | Zaalouk 227 | Mutton curry 228 | Mughlai paratha 229 | Tuo Zaafi 230 | Bánh bột lọc 231 | /m/013f387h 232 | Cheeseburger 233 | Jelly bean 234 | Apple pie 235 | Udon 236 | Falafel 237 | Agedashi dōfu 238 | Dashi 239 | Tortell 240 | Omelette 241 | Crème brûlée 242 | Cucumber soup 243 | French toast 244 | Tripe 245 | Pepperoni 246 | Salami 247 | Kimchi 248 | Knödel 249 | Takoyaki 250 | Halva 251 | Pigs in a blanket 252 | Spanakopita 253 | Pumpkin pie 254 | Jambalaya 255 | Club sandwich 256 | Churro 257 | Turducken 258 | Welsh rarebit 259 | Hot dog 260 | Oyakodon 261 | Meatball 262 | Waldorf salad 263 | Potato salad 264 | Satay 265 | Pemmican 266 | Mämmi 267 | Fideuà 268 | Waffle 269 | Pancake 270 | Quiche 271 | Borscht 272 | Bratwurst 273 | Foie gras 274 | Burrito 275 | Goulash 276 | Spotted dick 277 | Coq au vin 278 | Ratatouille 279 | Cornbread 280 | Souvlaki 281 | Chow mein 282 | Roast beef 283 | Peking duck 284 | Fried chicken 285 | Croquembouche 286 | Tahini 287 | Gumbo 288 | Fajita 289 | Chicken fried steak 290 | Sukiyaki 291 | Scrapple 292 | Chili con carne 293 | Monte Cristo sandwich 294 | Kielbasa 295 | Polenta 296 | Reuben sandwich 297 | S'more 298 | Andouille 299 | Beignet 300 | Crêpe 301 | Gulai 302 | Breakfast sausage 303 | Chorizo 304 | Gyro 305 | Nachos 306 | Larb 307 | Couscous 308 | Meze 309 | Cheesesteak 310 | Frozen yogurt 311 | Injera 312 | Muesli 313 | Meatloaf 314 | Fuet 315 | Nattō 316 | Banana split 317 | Pączki 318 | Pound cake 319 | Fuqi feipian 320 | Nasi lemak 321 | Flan 322 | Pad thai 323 | Yakitori 324 | Amanattō 325 | Tom kha kai 326 | Lokma 327 | Mooncake 328 | Idli 329 | Spätzle 330 | Nopalito 331 | Sincronizada 332 | Žganci 333 | Totopo 334 | Folar 335 | Cherry pie 336 | Umeboshi 337 | Patty 338 | Saltah 339 | Khinkali 340 | Shkedei marak 341 | Tekkadon 342 | Chadachadi 343 | Kaipen 344 | Draw soup 345 | Shahan ful 346 | Shiro 347 | Ga'at 348 | Skordalia 349 | Budae jjigae 350 | Anju 351 | Fried Coke 352 | Lemang 353 | Basundi 354 | Brown Betty 355 | Khabees 356 | Kottu 357 | Isterband 358 | Ciauscolo 359 | Khatkhate 360 | Pan de muerto 361 | Caponata 362 | /m/0267f9w 363 | Sabaayad 364 | Miyeok-guk 365 | Imoni 366 | Pitha 367 | Kedgeree 368 | Bife a cavalo 369 | Yaki udon 370 | She-crab soup 371 | Koozh 372 | Keşkek 373 | Cabidela 374 | Gerber sandwich 375 | Zagorski Štrukli 376 | Himbasha 377 | Sataraš 378 | Kakuni 379 | Enormous Omelet Sandwich 380 | Turrón 381 | Tsukudani 382 | Hawaiian haystack 383 | Kateh 384 | Stoemp 385 | Pajeon 386 | Ġbejna 387 | Kaya toast 388 | Fit-fit 389 | Kitcha 390 | Thalipeeth 391 | Figgy pudding 392 | Cachupa 393 | Cherries jubilee 394 | Crappit heid 395 | Mince and tatties 396 | Anadama bread 397 | Carbonara 398 | Kladdkaka 399 | Shakshouka 400 | Chicken Vesuvio 401 | Jibarito 402 | Chicken Divan 403 | Motsunabe 404 | Sonofabitch stew 405 | Corn pudding 406 | Johnny Marzetti 407 | Mostarda 408 | Maafe 409 | Churma 410 | Chole bhature 411 | Dobos torte 412 | Carne de porco à alentejana 413 | Khao soi 414 | Kissel 415 | Cottage loaf 416 | Silver needle noodles 417 | Shrimp DeJonghe 418 | Kiritanpo 419 | Bean pie 420 | Churchkhela 421 | Yahni 422 | Gringas 423 | Annin tofu 424 | Jiaozi 425 | Breakfast sandwich 426 | Tanghulu 427 | Black sesame soup 428 | Gougère 429 | Namul 430 | Kosambari 431 | Ma'amoul 432 | Caldo de pollo 433 | Loukaniko 434 | Doberge cake 435 | Nasi campur 436 | Snack cake 437 | Taiyaki 438 | Karnıyarık 439 | Pierogi 440 | Macaroni and cheese 441 | Huevos motuleños 442 | Chislic 443 | Corn dog 444 | Shawarma 445 | Zongzi 446 | Dumpling 447 | Syrniki 448 | King cake 449 | Soufflé 450 | Gyūdon 451 | Chicken nugget 452 | Bulgogi 453 | Eggs Benedict 454 | Hot dry noodles 455 | Mashed potato 456 | Anpan 457 | Quesadilla 458 | Youtiao 459 | Congee 460 | Sekihan 461 | Semla 462 | Arctic roll 463 | Castella 464 | Hanabiramochi 465 | Falukorv 466 | Ketupat 467 | Rendang 468 | Chocolate brownie 469 | Mapo doufu 470 | Chinese noodles 471 | Empanada 472 | Fried rice 473 | Chicago-style pizza 474 | Cuban sandwich 475 | Tarte Tatin 476 | Yakisoba 477 | Dagwood sandwich 478 | Cheesecake 479 | Samosa 480 | Devil's food cake 481 | Shashlik 482 | Horseshoe sandwich 483 | City chicken 484 | Key lime pie 485 | Potato skins 486 | Haejang-guk 487 | Burmese tofu 488 | Shumai 489 | Sour cherry soup 490 | Gigandes plaki 491 | Majboos 492 | Chicken curry 493 | Shrimp Creole 494 | Pork tenderloin sandwich 495 | Dampfnudel 496 | Finnan haddie 497 | Kenkey 498 | Pincho 499 | Gundruk 500 | Chilorio 501 | Koulourakia 502 | Bryndzové halušky 503 | Imagawayaki 504 | Vasilopita 505 | Strapačky 506 | Po' boy 507 | Capirotada 508 | Beef Manhattan 509 | Sandwich loaf 510 | Jian dui 511 | Almond biscuit 512 | West Slavic fermented cereal soups 513 | Fried plantain 514 | Stuffed peppers 515 | Piperade 516 | Rogan josh 517 | Fabada asturiana 518 | Potato wedges 519 | Calisson 520 | Prawn ball 521 | Kushikatsu 522 | Lo mai chi 523 | Manchet 524 | Leek soup 525 | Vanillerostbraten 526 | Hangtown fry 527 | Cabbie claw 528 | Chitranna 529 | Ragi mudde 530 | Denver sandwich 531 | Laverbread 532 | Elote 533 | Kulolo 534 | Oxtail soup 535 | Pantua 536 | Corn relish 537 | Pogača 538 | Qubani-ka-Meetha 539 | Boondi 540 | Arrosticini 541 | Panelle 542 | Santula 543 | Tofu skin roll 544 | Crispy fried chicken 545 | Steamed meatball 546 | Lobio 547 | Suman 548 | Hōtō 549 | Matbukha 550 | /m/02rgjs1 551 | Açorda 552 | Makdous 553 | Soto 554 | Frangollo 555 | Patty melt 556 | Taro dumpling 557 | Entomatada 558 | Bánh cuốn 559 | Corunda 560 | Zhaliang 561 | Cassoulet 562 | Debrecener 563 | Scampi 564 | Pilaf 565 | Sambar 566 | Century egg 567 | Escargot 568 | Cong you bing 569 | Beef noodle soup 570 | Magiritsa 571 | Gugelhupf 572 | Sachima 573 | White rice 574 | Maultasche 575 | American chop suey 576 | Fish slice 577 | Sea cucumber 578 | Beef ball 579 | Siu yuk 580 | Seafood birdsnest 581 | White cut chicken 582 | /m/02vwryj 583 | Satsivi 584 | Malpua 585 | Chhena gaja 586 | Flying Jacob 587 | Steak de Burgo 588 | Crab Louie 589 | Butter chicken 590 | Amok trey 591 | Menemen 592 | Piadina 593 | Orange cuttlefish 594 | Fudge 595 | Cottage Pudding 596 | Meatcake 597 | Buttermilk pie 598 | Kalamay 599 | Puto 600 | Dal makhani 601 | Mixiote 602 | Bagel dog 603 | Bún riêu 604 | Feijoada 605 | Pho 606 | Milk toast 607 | Liver and onions 608 | Iced bun 609 | Sheer khurma 610 | Yi mein 611 | Shrimp roe noodles 612 | Lai fun 613 | Oil noodles 614 | Kal-guksu 615 | Youmian 616 | Avgolemono 617 | Pork roll 618 | Tart 619 | Leberkäse 620 | Kalakukko 621 | Mustamakkara 622 | Baba ghanoush 623 | Karelian pasty 624 | Shortcake 625 | Profiterole 626 | Moussaka 627 | Dulce de leche 628 | Blaa 629 | Risotto 630 | Funnel cake 631 | Fried dough 632 | Consommé 633 | Clam chowder 634 | Tartiflette 635 | Red curry 636 | Tandoori chicken 637 | Gazpacho 638 | Prosciutto 639 | Boerewors 640 | Baked potato 641 | Bouillabaisse 642 | Kralan 643 | Chireta 644 | Bakewell tart 645 | Grits 646 | Shaved ice 647 | Choco pie 648 | Cumian 649 | Jokbal 650 | Grillades 651 | Hotteok 652 | Ezogelin soup 653 | Knedle 654 | Masgouf 655 | Sope 656 | Coconut rice 657 | Bakarkhani 658 | Asida 659 | Dirt cake 660 | Sel roti 661 | Kalakand 662 | Ghevar 663 | Sussex pond pudding 664 | Lontong 665 | Bánh bèo 666 | Pringá 667 | Bull roast 668 | Stuffed ham 669 | Lablabi 670 | Gooey butter cake 671 | Carciofi alla giudia 672 | Yin si juan 673 | Babi panggang 674 | Chao hong guo 675 | Fun guo 676 | Khira sagara 677 | Coconut bar 678 | Sundae 679 | Tuna fish sandwich 680 | Zhangcha duck 681 | Marry girl cake 682 | Frijoles charros 683 | Rosca de reyes 684 | Happy Faces 685 | Deviled crab 686 | Sundubu-jjigae 687 | Sinseollo 688 | Dongchimi 689 | Nabak-kimchi 690 | Dhondas 691 | Soan papdi 692 | Baek-kimchi 693 | Chicken riggies 694 | Afelia 695 | Gulyásleves 696 | Marie biscuit 697 | Café liégeois 698 | Chè 699 | Pootharekulu 700 | Escalope 701 | Rajma 702 | Beshbarmak 703 | Torta Tre Monti 704 | French dip 705 | Pumpkin-coconut custard 706 | Rose hip soup 707 | Veggie burger 708 | Steak tartare 709 | Bologna sausage 710 | Pâté 711 | Bibimbap 712 | Shahi paneer 713 | Fufu 714 | Pyttipanna 715 | Chicken sandwich 716 | Ghari 717 | Michigan salad 718 | Cabinet pudding 719 | American fried rice 720 | Korovai 721 | Churrasco 722 | Pasulj 723 | Mitraillette 724 | Salată de boeuf 725 | Rice pudding 726 | Rösti 727 | Naryn 728 | Kaldereta 729 | Makroudh 730 | Kachumbari 731 | Tsukemono 732 | Cheese fries 733 | Slatko 734 | Qatayef 735 | Passatelli 736 | Sweet potato soup 737 | Shchi 738 | Kulfi 739 | Dolma 740 | Kai yang 741 | Shark fin soup 742 | Pozole 743 | Pakora 744 | Chantilly cake 745 | Krówki 746 | Russian tea cake 747 | Ox-tongue pastry 748 | Sachertorte 749 | Palitaw 750 | Jolpan 751 | Mantou 752 | Finger steaks 753 | Steak sandwich 754 | Talo 755 | Erkuai 756 | Mixian 757 | St. Louis-style pizza 758 | Moambe 759 | Upma 760 | Panjiri 761 | Eggs Sardou 762 | Shanghai fried noodles 763 | Quarkkäulchen 764 | Cupcake 765 | Snickerdoodle 766 | Farl 767 | Coleslaw 768 | Calas 769 | Beef Stroganoff 770 | Shimotsukare 771 | Squab 772 | Basbousa 773 | Watalappam 774 | Tepsi baytinijan 775 | Kuli-kuli 776 | Shabu-shabu 777 | Sundae 778 | Fried brain sandwich 779 | Rollmops 780 | Higashi 781 | Panna cotta 782 | Aloo gobi 783 | Aspic 784 | Obatzda 785 | Gulab jamun 786 | Tuna casserole 787 | Ribollita 788 | Chomchom 789 | Rassolnik 790 | Jeongol 791 | Cantonese seafood soup 792 | Eggplant Salad 793 | Kürtőskalács 794 | Pölsa 795 | Lobster roll 796 | Sloppy joe 797 | Schnitzel 798 | Bacalhau 799 | Sfenj 800 | Menudo 801 | Gujia 802 | Liver soup 803 | Panocha 804 | Chakapuli 805 | Sklandrausis 806 | Liver pâté 807 | Rullepølse 808 | Frikadeller 809 | Frikandel 810 | Cinnamon roll 811 | Scotch pie 812 | Hot wiener 813 | Wodzionka 814 | Greek salad 815 | Raita 816 | Dong'an chicken 817 | Boortsog 818 | Coca 819 | Champon 820 | Tabbouleh 821 | Korokke 822 | Chile relleno 823 | Brandade 824 | Hoppang 825 | Gozinaki 826 | Lazarakia 827 | Puff Puff 828 | Fatteh 829 | Speculaas 830 | Karasumi 831 | Brandy snaps 832 | Trdelník 833 | Cocido madrileño 834 | Red velvet cake 835 | Kringle 836 | Quenelle 837 | Toasted ravioli 838 | Tajine 839 | Cranachan 840 | Rusk 841 | Mille-feuille 842 | Acorn noodle soup 843 | Gachas 844 | Jingisukan 845 | Thekua 846 | Ghugni 847 | Tarama 848 | Italian beef 849 | Challah 850 | Fried ice cream 851 | Onion ring 852 | Smoked meat 853 | Dahi vada 854 | Mother-in-law 855 | Blondie 856 | Guk 857 | Hiyashi chūka 858 | Sweet shells 859 | Salisbury steak 860 | Poffertjes 861 | Eggs Neptune 862 | Galbi-jjim 863 | Agwi-jjim 864 | Ladob 865 | Instant-boiled mutton 866 | Cincalok 867 | Jook-sing noodles 868 | Potbrood 869 | Burkinabe cuisine 870 | Taralli 871 | Carbonade flamande 872 | Xôi 873 | Sauerbraten 874 | Spiedie 875 | Gimbap 876 | Czernina 877 | Kroppkaka 878 | Buddha's delight 879 | Pain au chocolat 880 | Goetta 881 | German chocolate cake 882 | Melt sandwich 883 | Popiah 884 | Haleem 885 | Hornazo 886 | Janchi-guksu 887 | Kipper 888 | Bossam 889 | Arbroath smokie 890 | Bologna sandwich 891 | Cobbler 892 | Kouign-amann 893 | Char kway teow 894 | Rostbrätel 895 | Doenjang-jjigae 896 | Tharid 897 | Hainanese chicken rice 898 | Bak kut teh 899 | Cabbage roll 900 | Runza 901 | Bananas Foster 902 | Kozhukkatta 903 | Kūčiukai 904 | Smørrebrød 905 | Kutia 906 | Deviled egg 907 | Buchteln 908 | Apple strudel 909 | Wonton 910 | Chess pie 911 | Pirozhki 912 | Douzhi 913 | Macaroni soup 914 | Crossing-the-bridge noodles 915 | Lechazo 916 | Rolled oyster 917 | Asam pedas 918 | Mi krop 919 | Patoleo 920 | Rigó Jancsi 921 | Ollada 922 | Garbure 923 | Sabudana Khichadi 924 | Potée 925 | Phanaeng curry 926 | Madeleine 927 | Mashed pumpkin 928 | Suet pudding 929 | Bombay mix 930 | Namagashi 931 | Struffoli 932 | Dak-galbi 933 | Chuchvara 934 | Misal 935 | Patatnik 936 | Yuxiang 937 | Frozen banana 938 | Psarosoupa 939 | Mekitsa 940 | Sanna 941 | Qazı 942 | Sorbetes 943 | Potatoes O'Brien 944 | Tom yum 945 | Balushahi 946 | Arroz a la cubana 947 | Jalebi 948 | Sopaipilla 949 | Ukha 950 | Svíčková 951 | Túrós csusza 952 | Pinnekjøtt 953 | Salty liquorice 954 | Lemon ice box pie 955 | Knickerbocker glory 956 | Zhajiangmian 957 | Cobb salad 958 | Misua 959 | Shoofly pie 960 | Bhakri 961 | Apple cake 962 | Orange chicken 963 | Jamón serrano 964 | Bundt cake 965 | Bara brith 966 | Hot pot 967 | Kung Pao chicken 968 | Mulukhiyah 969 | Piti 970 | Double ka meetha 971 | Choila 972 | Moustalevria 973 | Arizona cheese crisp 974 | Rice Krispies Treats 975 | Liangpi 976 | Prinskorv 977 | Salmorejo 978 | Chicken Française 979 | Fläskkorv 980 | Glorified rice 981 | /m/04zzsvg 982 | Stinky tofu 983 | Muffuletta 984 | Soy sauce chicken 985 | Chicken fingers 986 | Pecan pie 987 | Eba 988 | Parfait 989 | Ndolé 990 | Cheese sandwich 991 | Carne de vinha d'alhos 992 | Bob Andy pie 993 | Cincinnati chili 994 | Frico 995 | Tapioca pudding 996 | Minestrone 997 | Boxty 998 | Naengmyeon 999 | Seven-layer salad 1000 | /m/0553tg 1001 | Cawl 1002 | Chocolate pudding 1003 | Hotdish 1004 | Ciccioli 1005 | Douhua 1006 | Berliner 1007 | Fried fish 1008 | Apple crisp 1009 | Boudin 1010 | Yusheng 1011 | Babka 1012 | Pizzoccheri 1013 | Welsh cake 1014 | Parker House roll 1015 | Tripe soup 1016 | Chimichanga 1017 | Jucy Lucy 1018 | Dodger Dog 1019 | Pastiera 1020 | Huarache 1021 | Solkadhi 1022 | Schupfnudel 1023 | Waldorf pudding 1024 | Harees 1025 | Ash reshteh 1026 | Celery Victor 1027 | Diples 1028 | Kompot 1029 | French onion soup 1030 | Tres leches cake 1031 | Torta caprese 1032 | Black Forest gateau 1033 | Pâté aux pommes de terre 1034 | Lâpa 1035 | Bündner Nusstorte 1036 | Hachee 1037 | Spaghetti aglio e olio 1038 | Whoopie pie 1039 | Ais kacang 1040 | Chermoula 1041 | Gado-gado 1042 | Merguez 1043 | Snickers salad 1044 | Giouvetsi 1045 | Kharcho 1046 | Chicken fried bacon 1047 | Dessert bar 1048 | Coulibiac 1049 | Thieboudienne 1050 | Rabri 1051 | Sapin-sapin 1052 | Sealed crustless sandwich 1053 | Carne asada 1054 | Coyotas 1055 | Chocolate-covered bacon 1056 | Stroopwafel 1057 | Gravlax 1058 | Pot pie 1059 | Ghormeh sabzi 1060 | Surf and turf 1061 | Brunswick stew 1062 | Mititei 1063 | Fluffernutter 1064 | Khaja 1065 | Stottie cake 1066 | London broil 1067 | Fasolada 1068 | Strudel 1069 | Øllebrød 1070 | Tamago kake gohan 1071 | Hot water corn bread 1072 | Philippine adobo 1073 | Hulatang 1074 | Dyrlægens natmad 1075 | Chistorra 1076 | Polkagris 1077 | Galbi-tang 1078 | Mrouzia 1079 | Gopchang-jeongol 1080 | Miang kham 1081 | Clams casino 1082 | Nanbanzuke 1083 | Dripping cake 1084 | Cookie salad 1085 | Usal 1086 | Mandu-guk 1087 | Smalahove 1088 | Kokis 1089 | Ori-tang 1090 | Pakhala 1091 | Cream pie 1092 | Butajiru 1093 | New England boiled dinner 1094 | Chhena jalebi 1095 | Pastitsio 1096 | Panucho 1097 | Chhena kheeri 1098 | Kifli 1099 | Solyanka 1100 | Sadhya 1101 | Cullen skink 1102 | Havregrynskugle 1103 | Harira 1104 | Cornish game hen 1105 | Beef on weck 1106 | Tompouce 1107 | Caldo de siete mares 1108 | Millionbøf 1109 | Chicago-style hot dog 1110 | Risalamande 1111 | Alinazik kebab 1112 | Medisterpølse 1113 | Sarson da saag 1114 | Liangfen 1115 | Pistolette 1116 | Steamed clams 1117 | Ulam 1118 | Kheer 1119 | Tlacoyo 1120 | Tarator 1121 | /m/061ptq 1122 | /m/062p8x 1123 | Cochinita pibil 1124 | Buddha Jumps Over the Wall 1125 | Sfouf 1126 | Ham and cheese sandwich 1127 | """Peanut butter" 1128 | """Bacon" 1129 | Chicken karahi 1130 | Maple bacon donut 1131 | Litti 1132 | Nam Khao 1133 | Nam tok 1134 | Baozi 1135 | Kibbeh 1136 | Kushari 1137 | Jiuniang 1138 | /m/06603bl 1139 | Machher Jhol 1140 | Fahsa 1141 | Mysore pak 1142 | Chalupa 1143 | Swiss roll 1144 | Balkenbrij 1145 | Tortas de aceite 1146 | Popover 1147 | Falooda 1148 | Macaroni salad 1149 | Barbacoa 1150 | Hushpuppy 1151 | Luther Burger 1152 | Ragout 1153 | Bánh bao 1154 | Moronga 1155 | Hayashi rice 1156 | Zürcher Geschnetzeltes 1157 | Éclair 1158 | Colcannon 1159 | Bear claw 1160 | Francesinha 1161 | Wat 1162 | Loco moco 1163 | Hot milk cake 1164 | Hoe 1165 | Gordita 1166 | Macaron 1167 | Pepperoni roll 1168 | Rasgulla 1169 | Angel wings 1170 | Huevos rancheros 1171 | Caprese salad 1172 | Kombdi vade 1173 | Yong tau foo 1174 | Chai tow kway 1175 | Machaca 1176 | Ugali 1177 | Arròs negre 1178 | Kimchi fried rice 1179 | Frybread 1180 | Halo-halo 1181 | Shiokara 1182 | Janssons frestelse 1183 | Hot Brown 1184 | Torta 1185 | Ćevapi 1186 | Salt water taffy 1187 | Çılbır 1188 | Murtabak 1189 | Tahu goreng 1190 | Soto ayam 1191 | Mee siam 1192 | Submarine sandwich 1193 | Halušky 1194 | Kimchi-jjigae 1195 | Fish ball 1196 | Blodpalt 1197 | Lebanon bologna 1198 | Okroshka 1199 | Linzer torte 1200 | Shrikhand 1201 | Yakiniku 1202 | Huevos divorciados 1203 | Nihari 1204 | Sautéed reindeer 1205 | Hasty pudding 1206 | Mission burrito 1207 | Sweet and sour pork 1208 | Rødgrød 1209 | Booyah 1210 | Bienenstich 1211 | Dressed herring 1212 | New York-style pizza 1213 | Bistek 1214 | Sinigang 1215 | Fios de ovos 1216 | Vitello tonnato 1217 | Bisque 1218 | /m/06w9wv4 1219 | Modak 1220 | New Haven-style pizza 1221 | California-style pizza 1222 | Wrap 1223 | Puri 1224 | Jamón 1225 | Khash 1226 | Beef bourguignon 1227 | Truffade 1228 | Bò nướng lá lốt 1229 | Ful medames 1230 | Aligot 1231 | Kolach 1232 | Guaiwei 1233 | Kesme 1234 | Funeral potatoes 1235 | Sushi 1236 | Arancini 1237 | Creamed corn 1238 | Mozzarella sticks 1239 | American goulash 1240 | Gofio 1241 | Soup alla Canavese 1242 | Red beans and rice 1243 | Rössypottu 1244 | Fläskpannkaka 1245 | Hyderabadi biryani 1246 | Baeckeoffe 1247 | Eton mess 1248 | Khachapuri 1249 | Banoffee pie 1250 | Ants climbing a tree 1251 | Dandan noodles 1252 | Suanla chaoshou 1253 | Samgye-tang 1254 | Spam musubi 1255 | Bridie 1256 | Kaju katli 1257 | Chocolate-covered potato chips 1258 | Enne gai 1259 | Ruske kape 1260 | Spaghetti 1261 | Grass jelly 1262 | Salt potatoes 1263 | Katsudon 1264 | Pasanda 1265 | Banitsa 1266 | Flammekueche 1267 | Twice-cooked pork 1268 | Kare-kare 1269 | Laobing 1270 | Banmian 1271 | Honey cake 1272 | Swiss wing 1273 | Michigan hot dog 1274 | Tong sui 1275 | Taco 1276 | Sosatie 1277 | Pap 1278 | Umngqusho 1279 | Malva pudding 1280 | Vichyssoise 1281 | Zōni 1282 | Maxwell Street Polish 1283 | Vetkoek 1284 | Mealie bread 1285 | Chakalaka 1286 | Frikkadel 1287 | /m/07fr1x 1288 | Tteokguk 1289 | Coney Island hot dog 1290 | Tirokafteri 1291 | Fesikh 1292 | Boston cream pie 1293 | Buttermilk koldskål 1294 | White boiled shrimp 1295 | Bagnun 1296 | Buntil 1297 | /m/07l949 1298 | Pisto 1299 | Dhokla 1300 | Al pastor 1301 | St. Paul sandwich 1302 | Melonpan 1303 | Haupia 1304 | Lángos 1305 | Étouffée 1306 | Galaktoboureko 1307 | Börek 1308 | Suya 1309 | Rye bread 1310 | Escudella i carn d'olla 1311 | Gari 1312 | Tilkut 1313 | Botok 1314 | Tatws Pum Munud 1315 | Char siu 1316 | Burgoo 1317 | Cacık 1318 | Barfi 1319 | Mulligan stew 1320 | Biangbiang noodles 1321 | Banana pudding 1322 | Crab cake 1323 | Chinese sausage 1324 | Veal 1325 | Curry bread 1326 | Pastry heart 1327 | Crème caramel 1328 | Panada 1329 | Pie à la Mode 1330 | Bonus Jack 1331 | Princess cake 1332 | Harihari-nabe 1333 | Hot chicken 1334 | Chhena Jhili 1335 | Grape pie 1336 | Chicken bog 1337 | Sausage gravy 1338 | Derby pie 1339 | Ice cream cake 1340 | Swiss steak 1341 | /m/083tx9 1342 | Stack cake 1343 | Lobster Newberg 1344 | Nikujaga 1345 | Manti 1346 | Parmigiana 1347 | Palatschinke 1348 | Gujeolpan 1349 | Rajas con crema 1350 | Mak-guksu 1351 | Tetrazzini 1352 | Squid 1353 | Palak paneer 1354 | Krumkake 1355 | Bolani 1356 | Pork and beans 1357 | Nian gao 1358 | Oysters Rockefeller 1359 | Tavče gravče 1360 | Bakkwa 1361 | Xacuti 1362 | Sarapatel 1363 | Taquito 1364 | Egg drop soup 1365 | Shaobing 1366 | Chawanmushi 1367 | Nshima/Nsima 1368 | Pollock roe 1369 | Slinger 1370 | Japchae 1371 | St. Honoré cake 1372 | Barm cake 1373 | Tulumba 1374 | Xiaolongbao 1375 | Delmonico steak 1376 | Stromboli 1377 | Kanafeh 1378 | Hamdog 1379 | Garri 1380 | Kofta 1381 | Chana masala 1382 | Salo 1383 | Lung fung soup 1384 | Dirty rice 1385 | Urnebes 1386 | Andouillette 1387 | Landjäger 1388 | Fisherman's soup 1389 | Romeritos 1390 | Lane cake 1391 | Pork jelly 1392 | Idiyappam 1393 | Smörgåstårta 1394 | Smažený sýr 1395 | Arroz con pollo 1396 | /m/08xmsn 1397 | Petit gâteau 1398 | Tea egg 1399 | Cocada amarela 1400 | Japanese curry 1401 | Qeema 1402 | Unagi 1403 | Hoppin' John 1404 | Gyūhi 1405 | Clafoutis 1406 | Green curry 1407 | Gỏi cuốn 1408 | Chilli crab 1409 | Lo mai gai 1410 | Lo mein 1411 | Puttu 1412 | Fried pie 1413 | Spanish rice 1414 | Nuea phat phrik 1415 | Jeow bong 1416 | Massaman curry 1417 | Ostkaka 1418 | Guilinggao 1419 | Spettekaka 1420 | Cudighi 1421 | Saltimbocca 1422 | Sfogliatella 1423 | Beef chow fun 1424 | Chow mein sandwich 1425 | Carnitas 1426 | Chinese steamed eggs 1427 | Oyster omelette 1428 | Garden salad 1429 | Salade niçoise 1430 | Dal bhat 1431 | Biscuits and gravy 1432 | Omurice 1433 | Pao cai 1434 | Nasi liwet 1435 | Thai suki 1436 | Moo shu pork 1437 | Corn crab soup 1438 | Fabes con almejas 1439 | Golden Opulence Sundae 1440 | Ketoprak 1441 | Mala Mogodu 1442 | Tekwan 1443 | Vatrushka 1444 | Yin Yang fish 1445 | Boston cream doughnut 1446 | Ramen 1447 | Home fries 1448 | Mustacciuoli 1449 | Clam cake 1450 | Sarma 1451 | Shahe fen 1452 | Charleston red rice 1453 | Fish head curry 1454 | Podvarak 1455 | Pihtije 1456 | Popara 1457 | Kačamak 1458 | Seolleongtang 1459 | Gołąbki 1460 | Szaloncukor 1461 | Kalduny 1462 | Zrazy 1463 | Panettone 1464 | Ambelopoulia 1465 | Persimmon pudding 1466 | Floating island 1467 | Zeeuwse bolus 1468 | Ambuyat 1469 | Smulpaj 1470 | Moravian spice cookies 1471 | Mee pok 1472 | Jjigae 1473 | Pizza bagel 1474 | Tteok 1475 | Brændende kærlighed 1476 | Beaten biscuit 1477 | Æbleflæsk 1478 | Chicken paprikash 1479 | Tangyuan 1480 | Tuna pot 1481 | Burnt ends 1482 | Jamón ibérico 1483 | Rakfisk 1484 | Zarangollo 1485 | Túró Rudi 1486 | Flummery 1487 | Cecina 1488 | Galinha à portuguesa 1489 | Ankimo 1490 | Galinha à africana 1491 | Cha siu bao 1492 | Fugu chiri 1493 | Assidat Zgougou 1494 | Oxtail stew 1495 | Laping 1496 | Chaku 1497 | Caldillo de perro 1498 | Sopa de Gato 1499 | Keledoş 1500 | Mücver 1501 | Brotzeit 1502 | Shekerbura 1503 | Oeufs en meurette 1504 | Pappa al pomodoro 1505 | Teurgoule 1506 | Bánh xèo 1507 | Musakhan 1508 | Maqluba 1509 | Bob chorba 1510 | Rum baba 1511 | Veda bread 1512 | Fried shrimp 1513 | Pastilla 1514 | Strawberry delight 1515 | Cheese dream 1516 | Frejon 1517 | Gyeran-jjim 1518 | Revithia 1519 | Nasi bogana 1520 | Torta de gazpacho 1521 | Double Down 1522 | Seri Muka 1523 | Obi non 1524 | Garganelli 1525 | Kig ha farz 1526 | Mississippi mud pie 1527 | Eve's pudding 1528 | Amala 1529 | Okinawa soba 1530 | Lamian 1531 | Soki 1532 | Chicken Maryland 1533 | Chanpurū 1534 | Mlinci 1535 | Smyrna meatballs 1536 | Tavern sandwich 1537 | Yangzhou fried rice 1538 | Qutab 1539 | Dum Aloo 1540 | Queijo do Pico 1541 | Cocada 1542 | Calf's liver and bacon 1543 | Moules-frites 1544 | Anarsa 1545 | Tlayuda 1546 | Šakotis 1547 | Jollof rice 1548 | Moin moin 1549 | Jam roly-poly 1550 | Hochzeitssuppe 1551 | Mucenici 1552 | Ema datshi 1553 | Ngo hiang 1554 | Jello salad 1555 | Claypot chicken rice 1556 | Maeun-tang 1557 | Cifantuan 1558 | Rhubarb pie 1559 | Olla podrida 1560 | Har gow 1561 | Sayur lodeh 1562 | Memela 1563 | Wenchang chicken 1564 | Galinhada 1565 | Lecsó 1566 | Gypsy tart 1567 | Bougatsa 1568 | Germknödel 1569 | Haystack 1570 | Yule log 1571 | Butter cookie 1572 | Chicken à la King 1573 | Méchoui 1574 | Croquette 1575 | Shami kebab 1576 | Chicken and waffles 1577 | Poke 1578 | Punsch-roll 1579 | Turtle soup 1580 | Kansar 1581 | Glamorgan sausage 1582 | Mango pudding 1583 | Bánh canh 1584 | Caparrones 1585 | Zopf 1586 | Bath bun 1587 | Chelsea bun 1588 | London bun 1589 | Saffron bun 1590 | Chakhchoukha 1591 | Angel food cake 1592 | Lalab 1593 | Suckling pig 1594 | Barmbrack 1595 | Kotlet schabowy 1596 | Pastel de nata 1597 | Shave ice 1598 | Tipsy cake 1599 | Creamed eggs on toast 1600 | Kerak telor 1601 | Ogok-bap 1602 | Mortadella 1603 | Nut roll 1604 | Fried green tomatoes 1605 | Beondegi 1606 | Tsoureki 1607 | Tiropita 1608 | Pljeskavica 1609 | Karađorđeva šnicla 1610 | Kokoretsi 1611 | Skilpadjies 1612 | Corn chowder 1613 | Tarhana 1614 | Tufahije 1615 | Birria 1616 | Veal Orloff 1617 | Fattoush 1618 | Pane carasau 1619 | Rab cake 1620 | Buffalo burger 1621 | Treacle tart 1622 | Hamburger 1623 | Stamppot 1624 | Kopytka 1625 | Khai yat sai 1626 | Minchee 1627 | Kinema 1628 | Sgabeo 1629 | Chili dog 1630 | Spaghetti alle vongole 1631 | Bavarian cream 1632 | Bhaji 1633 | Kachori 1634 | Chowder 1635 | Scotch broth 1636 | Pea soup 1637 | Kitfo 1638 | Gored gored 1639 | Bánh chưng 1640 | Bún bò Huế 1641 | Bò 7 món 1642 | Cơm tấm 1643 | Ambrosia 1644 | Rönttönen 1645 | Balchão 1646 | Gibassier 1647 | Bacalhau à Zé do Pipo 1648 | Pane di Altamura 1649 | Mykyrokka 1650 | Paska 1651 | Blackberry pie 1652 | Mince pie 1653 | Corn cookie 1654 | Francesinha poveira 1655 | Picadillo 1656 | Runeberg torte 1657 | Khakhra 1658 | Ohn no khao swè 1659 | Sultsina 1660 | /m/0crv0m 1661 | Paella 1662 | Espetada 1663 | Pathiri 1664 | Horumonyaki 1665 | Khubz 1666 | Ciorbă 1667 | Kimchi-buchimgae 1668 | Sesame chicken 1669 | Thukpa 1670 | Chwinamul 1671 | Kabuni 1672 | Jhunka 1673 | Jolada rotti 1674 | Spoonbread 1675 | Kulich 1676 | Phat khing 1677 | Namasu 1678 | Wonton noodles 1679 | Johnnycake 1680 | Panellets 1681 | Manjū 1682 | Mandi 1683 | Fortune cookie 1684 | Noppe 1685 | Slavink 1686 | Cockle bread 1687 | Caruru 1688 | Chả lụa 1689 | Pan bagnat 1690 | Sardenara 1691 | Enchilada 1692 | Sausage sandwich 1693 | Pistachio pudding 1694 | Chikki 1695 | Champorado 1696 | Coconut cake 1697 | Kaassoufflé 1698 | Carne pizzaiola 1699 | Khauk swè thoke 1700 | Gamja-tang 1701 | Kadhi 1702 | Green bean casserole 1703 | Apple dumpling 1704 | Cozonac 1705 | Pissaladière 1706 | Phat si-io 1707 | Drunken noodles 1708 | Jing Jiang Rou Si 1709 | Enduri Pitha 1710 | Kakara pitha 1711 | Tarta de Santiago 1712 | /m/0dn9nd 1713 | Sheftalia 1714 | Soybean sprout 1715 | Italian hot dog 1716 | Makchang 1717 | Meeshay 1718 | Bacalhau com natas 1719 | Mazurek 1720 | Nan gyi thohk 1721 | Ajapsandali 1722 | Carac 1723 | Mont di 1724 | Geng 1725 | Vispipuuro 1726 | Bakso 1727 | Canjica 1728 | Fougasse 1729 | Fool's Gold Loaf 1730 | Blueberry pie 1731 | Pickled cucumber 1732 | Ogbono soup 1733 | Champ 1734 | Oysters en brochette 1735 | Paskha 1736 | Shish taouk 1737 | Acarajé 1738 | Ras malai 1739 | San-nakji 1740 | Bungeo-ppang 1741 | Skilandis 1742 | Gosh-e Fil 1743 | Nasi dagang 1744 | Gheimeh 1745 | Fesenjān 1746 | Bacalhau à Gomes de Sá 1747 | Fårikål 1748 | Bedfordshire clanger 1749 | Tonkatsu 1750 | Thai fried rice 1751 | Manakish 1752 | Schweinshaxe 1753 | Chorba 1754 | Oliebol 1755 | Ropa vieja 1756 | Natchitoches meat pie 1757 | Icebox cake 1758 | Sorrel soup 1759 | Lahoh 1760 | Bolillo 1761 | Mollete 1762 | Caldeirada 1763 | Ogi 1764 | Watergate salad 1765 | Yaksik 1766 | Half-smoke 1767 | Dakos 1768 | Sweet potato pie 1769 | Cappon magro 1770 | Serundeng 1771 | Rijstevlaai 1772 | Ajoblanco 1773 | Yaka mein 1774 | Jujeh kabab 1775 | Soy egg 1776 | Shuizhu 1777 | Puliyogare 1778 | Sago 1779 | Laulau 1780 | Curtido 1781 | Tapai 1782 | Press cake 1783 | Cuchifritos 1784 | Vlaai 1785 | Malvern pudding 1786 | Baklava 1787 | Cheese dog 1788 | Luchi 1789 | Cowboy beans 1790 | Sandesh 1791 | Steak Diane 1792 | Lobster stew 1793 | Finikia 1794 | Bibingka 1795 | Tafelspitz 1796 | Ploye 1797 | Sayur asem 1798 | Trinxat 1799 | Nikuman 1800 | Cozido à portuguesa 1801 | Bacalhau à Brás 1802 | Tomato compote 1803 | Sesame seed candy 1804 | Dhebra 1805 | Kaeng pa 1806 | Mas riha 1807 | Zosui 1808 | Yassa 1809 | Pambazo 1810 | Imarti 1811 | Bacalhau com todos 1812 | Black pepper crab 1813 | Queso flameado 1814 | Black and white cookie 1815 | Red braised pork belly 1816 | Krofne 1817 | Uštipci 1818 | Rožata 1819 | Punjena paprika 1820 | Fusi 1821 | Maneštra 1822 | Kroštule 1823 | Fritule 1824 | Protein bar 1825 | Cordon bleu 1826 | Pirog 1827 | Pachi Pulusu 1828 | Frigărui 1829 | Chhena poda 1830 | Poornalu 1831 | Ponganalu 1832 | Bing 1833 | Flaouna 1834 | Chakodi 1835 | Aloo paratha 1836 | Konro 1837 | Cemita 1838 | Asinan 1839 | Broa 1840 | Trifle 1841 | Rat na 1842 | Borlengo 1843 | Gazpachuelo 1844 | Esterházy torte 1845 | Magenbrot 1846 | Detroit-style pizza 1847 | Fuling jiabing 1848 | Lakhamari 1849 | Mućkalica 1850 | Sukhdi 1851 | Kilishi 1852 | Baji 1853 | Peanut butter cookie 1854 | Rabbit pie 1855 | Paling in 't groen 1856 | Chataamari 1857 | Lawar 1858 | Arisa Pitha 1859 | Empal gentong 1860 | Carne asada fries 1861 | Takikomi gohan 1862 | Kamameshi 1863 | Pasta salad 1864 | Fasole cu cârnați 1865 | Zelnik 1866 | Plăcintă 1867 | Tongseng 1868 | Soto mie 1869 | Sarburma 1870 | Lutefisk 1871 | Khichdi 1872 | Briouat 1873 | Chili burger 1874 | Bolo de mel 1875 | Clootie 1876 | Seswaa 1877 | Tahu sumedang 1878 | Pichelsteiner 1879 | Bread soup 1880 | Scotcheroos 1881 | Kartoffelkäse 1882 | Schuxen 1883 | Caramel 1884 | Zwetschgenkuchen 1885 | Alloco 1886 | Vangibath 1887 | Torricado 1888 | Phat phrik khing 1889 | Tomato and egg soup 1890 | /m/0h65ym4 1891 | Spanakorizo 1892 | Ostropel 1893 | Tamale 1894 | Seattle-style hot dog 1895 | Ammonia cookie 1896 | Boston baked beans 1897 | Amandine 1898 | Duck blood and vermicelli soup 1899 | Azerbaijani pakhlava 1900 | Bakwan 1901 | Wallenbergare 1902 | Pastry 1903 | Melomakarono 1904 | Cocido lebaniego 1905 | Koi 1906 | Stir-fried tomato and scrambled eggs 1907 | Flæskesteg 1908 | Beggar's Chicken 1909 | /m/0hzpvf0 1910 | Konkonte 1911 | Stuffed squash 1912 | Kaeng som 1913 | Kentucky jam cake 1914 | Murături 1915 | Tochitură 1916 | Urap 1917 | Cornulețe 1918 | Quad City-style pizza 1919 | Paneer tikka 1920 | Ciorbă de perișoare 1921 | /m/0j66841 1922 | Shaker lemon pie 1923 | Doodhpak 1924 | Ceviche 1925 | Cabbage soup 1926 | Nasi timbel 1927 | Pa amb tomàquet 1928 | Escalivada 1929 | Međimurska gibanica 1930 | Khanom chan 1931 | Ohaw 1932 | Baghrir 1933 | Hummingbird cake 1934 | Neapolitan pizza 1935 | Doughnut 1936 | Hummus 1937 | Nimono 1938 | Chocolate chip cookie 1939 | Bún ốc 1940 | Cheese straw 1941 | Sausage 1942 | Frogeye salad 1943 | Senate bean soup 1944 | Botifarra 1945 | Leberknödel 1946 | Laziji 1947 | Quzi 1948 | Chazuke 1949 | Sandwich 1950 | BLT 1951 | Chikhirtma 1952 | Pico de gallo 1953 | Oden 1954 | Tostada 1955 | Chilaquiles 1956 | Cocido montañés 1957 | Lontong Cap Go Meh 1958 | Porra antequerana 1959 | Kedjenou 1960 | Tourin 1961 | Attiéké 1962 | Dak-bokkeum-tang 1963 | Žemlovka 1964 | Dovga 1965 | Rice and gravy 1966 | Sai ua 1967 | Nam ngiao 1968 | Kaeng khae 1969 | Kaeng tai pla 1970 | Dim sum 1971 | Tahri 1972 | Bolo do caco 1973 | Buffalo wing 1974 | Pustakari 1975 | Pieds paquets 1976 | Tinginys 1977 | Sunnundallu 1978 | Lapskaus 1979 | Caldo tlalpeño 1980 | Milho frito 1981 | Kalu dodol 1982 | Poppyseed muffin 1983 | Peanut soup 1984 | Tarte à la Bouillie 1985 | Caldo gallego 1986 | Samay Baji 1987 | Limburger sandwich 1988 | Huachinango a la Veracruzana 1989 | Sambal stingray 1990 | Kuluban 1991 | Modjeska 1992 | Pan dulce 1993 | Florina pepper 1994 | Oysters Bienville 1995 | Cronut 1996 | Duck rice 1997 | Sulu köfte 1998 | Toyga soup 1999 | Majjige huli 2000 | Ikan goreng 2001 | Lekor 2002 | Ciulama 2003 | Ayam bakar 2004 | Hinava 2005 | Waakye 2006 | Salbute 2007 | Kuchmachi 2008 | Kibinai 2009 | Lobiani 2010 | Chanakhi 2011 | Baghali ghatogh 2012 | Pkhali 2013 | Poc Chuc 2014 | Bionico 2015 | Bamischijf 2016 | Racuchy 2017 | Kuurdak 2018 | Hokkien fried rice 2019 | Mu kratha 2020 | Thong yip 2021 | Zuppa toscana 2022 | Dhindo 2023 | Thiakry 2024 | Kondowole -------------------------------------------------------------------------------- /server-tflite/src/models/food/lite-model_aiy_vision_classifier_food_V1_1.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WasmEdge/wasmedge_hyper_demo/85db6e7c7d06e96786d8d364f5869d1860c3c026/server-tflite/src/models/food/lite-model_aiy_vision_classifier_food_V1_1.tflite -------------------------------------------------------------------------------- /server-tflite/src/models/mobilenet_v1_1.0_224/labels_mobilenet_quant_v1_224.txt: -------------------------------------------------------------------------------- 1 | background 2 | tench 3 | goldfish 4 | great white shark 5 | tiger shark 6 | hammerhead 7 | electric ray 8 | stingray 9 | cock 10 | hen 11 | ostrich 12 | brambling 13 | goldfinch 14 | house finch 15 | junco 16 | indigo bunting 17 | robin 18 | bulbul 19 | jay 20 | magpie 21 | chickadee 22 | water ouzel 23 | kite 24 | bald eagle 25 | vulture 26 | great grey owl 27 | European fire salamander 28 | common newt 29 | eft 30 | spotted salamander 31 | axolotl 32 | bullfrog 33 | tree frog 34 | tailed frog 35 | loggerhead 36 | leatherback turtle 37 | mud turtle 38 | terrapin 39 | box turtle 40 | banded gecko 41 | common iguana 42 | American chameleon 43 | whiptail 44 | agama 45 | frilled lizard 46 | alligator lizard 47 | Gila monster 48 | green lizard 49 | African chameleon 50 | Komodo dragon 51 | African crocodile 52 | American alligator 53 | triceratops 54 | thunder snake 55 | ringneck snake 56 | hognose snake 57 | green snake 58 | king snake 59 | garter snake 60 | water snake 61 | vine snake 62 | night snake 63 | boa constrictor 64 | rock python 65 | Indian cobra 66 | green mamba 67 | sea snake 68 | horned viper 69 | diamondback 70 | sidewinder 71 | trilobite 72 | harvestman 73 | scorpion 74 | black and gold garden spider 75 | barn spider 76 | garden spider 77 | black widow 78 | tarantula 79 | wolf spider 80 | tick 81 | centipede 82 | black grouse 83 | ptarmigan 84 | ruffed grouse 85 | prairie chicken 86 | peacock 87 | quail 88 | partridge 89 | African grey 90 | macaw 91 | sulphur-crested cockatoo 92 | lorikeet 93 | coucal 94 | bee eater 95 | hornbill 96 | hummingbird 97 | jacamar 98 | toucan 99 | drake 100 | red-breasted merganser 101 | goose 102 | black swan 103 | tusker 104 | echidna 105 | platypus 106 | wallaby 107 | koala 108 | wombat 109 | jellyfish 110 | sea anemone 111 | brain coral 112 | flatworm 113 | nematode 114 | conch 115 | snail 116 | slug 117 | sea slug 118 | chiton 119 | chambered nautilus 120 | Dungeness crab 121 | rock crab 122 | fiddler crab 123 | king crab 124 | American lobster 125 | spiny lobster 126 | crayfish 127 | hermit crab 128 | isopod 129 | white stork 130 | black stork 131 | spoonbill 132 | flamingo 133 | little blue heron 134 | American egret 135 | bittern 136 | crane 137 | limpkin 138 | European gallinule 139 | American coot 140 | bustard 141 | ruddy turnstone 142 | red-backed sandpiper 143 | redshank 144 | dowitcher 145 | oystercatcher 146 | pelican 147 | king penguin 148 | albatross 149 | grey whale 150 | killer whale 151 | dugong 152 | sea lion 153 | Chihuahua 154 | Japanese spaniel 155 | Maltese dog 156 | Pekinese 157 | Shih-Tzu 158 | Blenheim spaniel 159 | papillon 160 | toy terrier 161 | Rhodesian ridgeback 162 | Afghan hound 163 | basset 164 | beagle 165 | bloodhound 166 | bluetick 167 | black-and-tan coonhound 168 | Walker hound 169 | English foxhound 170 | redbone 171 | borzoi 172 | Irish wolfhound 173 | Italian greyhound 174 | whippet 175 | Ibizan hound 176 | Norwegian elkhound 177 | otterhound 178 | Saluki 179 | Scottish deerhound 180 | Weimaraner 181 | Staffordshire bullterrier 182 | American Staffordshire terrier 183 | Bedlington terrier 184 | Border terrier 185 | Kerry blue terrier 186 | Irish terrier 187 | Norfolk terrier 188 | Norwich terrier 189 | Yorkshire terrier 190 | wire-haired fox terrier 191 | Lakeland terrier 192 | Sealyham terrier 193 | Airedale 194 | cairn 195 | Australian terrier 196 | Dandie Dinmont 197 | Boston bull 198 | miniature schnauzer 199 | giant schnauzer 200 | standard schnauzer 201 | Scotch terrier 202 | Tibetan terrier 203 | silky terrier 204 | soft-coated wheaten terrier 205 | West Highland white terrier 206 | Lhasa 207 | flat-coated retriever 208 | curly-coated retriever 209 | golden retriever 210 | Labrador retriever 211 | Chesapeake Bay retriever 212 | German short-haired pointer 213 | vizsla 214 | English setter 215 | Irish setter 216 | Gordon setter 217 | Brittany spaniel 218 | clumber 219 | English springer 220 | Welsh springer spaniel 221 | cocker spaniel 222 | Sussex spaniel 223 | Irish water spaniel 224 | kuvasz 225 | schipperke 226 | groenendael 227 | malinois 228 | briard 229 | kelpie 230 | komondor 231 | Old English sheepdog 232 | Shetland sheepdog 233 | collie 234 | Border collie 235 | Bouvier des Flandres 236 | Rottweiler 237 | German shepherd 238 | Doberman 239 | miniature pinscher 240 | Greater Swiss Mountain dog 241 | Bernese mountain dog 242 | Appenzeller 243 | EntleBucher 244 | boxer 245 | bull mastiff 246 | Tibetan mastiff 247 | French bulldog 248 | Great Dane 249 | Saint Bernard 250 | Eskimo dog 251 | malamute 252 | Siberian husky 253 | dalmatian 254 | affenpinscher 255 | basenji 256 | pug 257 | Leonberg 258 | Newfoundland 259 | Great Pyrenees 260 | Samoyed 261 | Pomeranian 262 | chow 263 | keeshond 264 | Brabancon griffon 265 | Pembroke 266 | Cardigan 267 | toy poodle 268 | miniature poodle 269 | standard poodle 270 | Mexican hairless 271 | timber wolf 272 | white wolf 273 | red wolf 274 | coyote 275 | dingo 276 | dhole 277 | African hunting dog 278 | hyena 279 | red fox 280 | kit fox 281 | Arctic fox 282 | grey fox 283 | tabby 284 | tiger cat 285 | Persian cat 286 | Siamese cat 287 | Egyptian cat 288 | cougar 289 | lynx 290 | leopard 291 | snow leopard 292 | jaguar 293 | lion 294 | tiger 295 | cheetah 296 | brown bear 297 | American black bear 298 | ice bear 299 | sloth bear 300 | mongoose 301 | meerkat 302 | tiger beetle 303 | ladybug 304 | ground beetle 305 | long-horned beetle 306 | leaf beetle 307 | dung beetle 308 | rhinoceros beetle 309 | weevil 310 | fly 311 | bee 312 | ant 313 | grasshopper 314 | cricket 315 | walking stick 316 | cockroach 317 | mantis 318 | cicada 319 | leafhopper 320 | lacewing 321 | dragonfly 322 | damselfly 323 | admiral 324 | ringlet 325 | monarch 326 | cabbage butterfly 327 | sulphur butterfly 328 | lycaenid 329 | starfish 330 | sea urchin 331 | sea cucumber 332 | wood rabbit 333 | hare 334 | Angora 335 | hamster 336 | porcupine 337 | fox squirrel 338 | marmot 339 | beaver 340 | guinea pig 341 | sorrel 342 | zebra 343 | hog 344 | wild boar 345 | warthog 346 | hippopotamus 347 | ox 348 | water buffalo 349 | bison 350 | ram 351 | bighorn 352 | ibex 353 | hartebeest 354 | impala 355 | gazelle 356 | Arabian camel 357 | llama 358 | weasel 359 | mink 360 | polecat 361 | black-footed ferret 362 | otter 363 | skunk 364 | badger 365 | armadillo 366 | three-toed sloth 367 | orangutan 368 | gorilla 369 | chimpanzee 370 | gibbon 371 | siamang 372 | guenon 373 | patas 374 | baboon 375 | macaque 376 | langur 377 | colobus 378 | proboscis monkey 379 | marmoset 380 | capuchin 381 | howler monkey 382 | titi 383 | spider monkey 384 | squirrel monkey 385 | Madagascar cat 386 | indri 387 | Indian elephant 388 | African elephant 389 | lesser panda 390 | giant panda 391 | barracouta 392 | eel 393 | coho 394 | rock beauty 395 | anemone fish 396 | sturgeon 397 | gar 398 | lionfish 399 | puffer 400 | abacus 401 | abaya 402 | academic gown 403 | accordion 404 | acoustic guitar 405 | aircraft carrier 406 | airliner 407 | airship 408 | altar 409 | ambulance 410 | amphibian 411 | analog clock 412 | apiary 413 | apron 414 | ashcan 415 | assault rifle 416 | backpack 417 | bakery 418 | balance beam 419 | balloon 420 | ballpoint 421 | Band Aid 422 | banjo 423 | bannister 424 | barbell 425 | barber chair 426 | barbershop 427 | barn 428 | barometer 429 | barrel 430 | barrow 431 | baseball 432 | basketball 433 | bassinet 434 | bassoon 435 | bathing cap 436 | bath towel 437 | bathtub 438 | beach wagon 439 | beacon 440 | beaker 441 | bearskin 442 | beer bottle 443 | beer glass 444 | bell cote 445 | bib 446 | bicycle-built-for-two 447 | bikini 448 | binder 449 | binoculars 450 | birdhouse 451 | boathouse 452 | bobsled 453 | bolo tie 454 | bonnet 455 | bookcase 456 | bookshop 457 | bottlecap 458 | bow 459 | bow tie 460 | brass 461 | brassiere 462 | breakwater 463 | breastplate 464 | broom 465 | bucket 466 | buckle 467 | bulletproof vest 468 | bullet train 469 | butcher shop 470 | cab 471 | caldron 472 | candle 473 | cannon 474 | canoe 475 | can opener 476 | cardigan 477 | car mirror 478 | carousel 479 | carpenter's kit 480 | carton 481 | car wheel 482 | cash machine 483 | cassette 484 | cassette player 485 | castle 486 | catamaran 487 | CD player 488 | cello 489 | cellular telephone 490 | chain 491 | chainlink fence 492 | chain mail 493 | chain saw 494 | chest 495 | chiffonier 496 | chime 497 | china cabinet 498 | Christmas stocking 499 | church 500 | cinema 501 | cleaver 502 | cliff dwelling 503 | cloak 504 | clog 505 | cocktail shaker 506 | coffee mug 507 | coffeepot 508 | coil 509 | combination lock 510 | computer keyboard 511 | confectionery 512 | container ship 513 | convertible 514 | corkscrew 515 | cornet 516 | cowboy boot 517 | cowboy hat 518 | cradle 519 | crane 520 | crash helmet 521 | crate 522 | crib 523 | Crock Pot 524 | croquet ball 525 | crutch 526 | cuirass 527 | dam 528 | desk 529 | desktop computer 530 | dial telephone 531 | diaper 532 | digital clock 533 | digital watch 534 | dining table 535 | dishrag 536 | dishwasher 537 | disk brake 538 | dock 539 | dogsled 540 | dome 541 | doormat 542 | drilling platform 543 | drum 544 | drumstick 545 | dumbbell 546 | Dutch oven 547 | electric fan 548 | electric guitar 549 | electric locomotive 550 | entertainment center 551 | envelope 552 | espresso maker 553 | face powder 554 | feather boa 555 | file 556 | fireboat 557 | fire engine 558 | fire screen 559 | flagpole 560 | flute 561 | folding chair 562 | football helmet 563 | forklift 564 | fountain 565 | fountain pen 566 | four-poster 567 | freight car 568 | French horn 569 | frying pan 570 | fur coat 571 | garbage truck 572 | gasmask 573 | gas pump 574 | goblet 575 | go-kart 576 | golf ball 577 | golfcart 578 | gondola 579 | gong 580 | gown 581 | grand piano 582 | greenhouse 583 | grille 584 | grocery store 585 | guillotine 586 | hair slide 587 | hair spray 588 | half track 589 | hammer 590 | hamper 591 | hand blower 592 | hand-held computer 593 | handkerchief 594 | hard disc 595 | harmonica 596 | harp 597 | harvester 598 | hatchet 599 | holster 600 | home theater 601 | honeycomb 602 | hook 603 | hoopskirt 604 | horizontal bar 605 | horse cart 606 | hourglass 607 | iPod 608 | iron 609 | jack-o'-lantern 610 | jean 611 | jeep 612 | jersey 613 | jigsaw puzzle 614 | jinrikisha 615 | joystick 616 | kimono 617 | knee pad 618 | knot 619 | lab coat 620 | ladle 621 | lampshade 622 | laptop 623 | lawn mower 624 | lens cap 625 | letter opener 626 | library 627 | lifeboat 628 | lighter 629 | limousine 630 | liner 631 | lipstick 632 | Loafer 633 | lotion 634 | loudspeaker 635 | loupe 636 | lumbermill 637 | magnetic compass 638 | mailbag 639 | mailbox 640 | maillot 641 | maillot 642 | manhole cover 643 | maraca 644 | marimba 645 | mask 646 | matchstick 647 | maypole 648 | maze 649 | measuring cup 650 | medicine chest 651 | megalith 652 | microphone 653 | microwave 654 | military uniform 655 | milk can 656 | minibus 657 | miniskirt 658 | minivan 659 | missile 660 | mitten 661 | mixing bowl 662 | mobile home 663 | Model T 664 | modem 665 | monastery 666 | monitor 667 | moped 668 | mortar 669 | mortarboard 670 | mosque 671 | mosquito net 672 | motor scooter 673 | mountain bike 674 | mountain tent 675 | mouse 676 | mousetrap 677 | moving van 678 | muzzle 679 | nail 680 | neck brace 681 | necklace 682 | nipple 683 | notebook 684 | obelisk 685 | oboe 686 | ocarina 687 | odometer 688 | oil filter 689 | organ 690 | oscilloscope 691 | overskirt 692 | oxcart 693 | oxygen mask 694 | packet 695 | paddle 696 | paddlewheel 697 | padlock 698 | paintbrush 699 | pajama 700 | palace 701 | panpipe 702 | paper towel 703 | parachute 704 | parallel bars 705 | park bench 706 | parking meter 707 | passenger car 708 | patio 709 | pay-phone 710 | pedestal 711 | pencil box 712 | pencil sharpener 713 | perfume 714 | Petri dish 715 | photocopier 716 | pick 717 | pickelhaube 718 | picket fence 719 | pickup 720 | pier 721 | piggy bank 722 | pill bottle 723 | pillow 724 | ping-pong ball 725 | pinwheel 726 | pirate 727 | pitcher 728 | plane 729 | planetarium 730 | plastic bag 731 | plate rack 732 | plow 733 | plunger 734 | Polaroid camera 735 | pole 736 | police van 737 | poncho 738 | pool table 739 | pop bottle 740 | pot 741 | potter's wheel 742 | power drill 743 | prayer rug 744 | printer 745 | prison 746 | projectile 747 | projector 748 | puck 749 | punching bag 750 | purse 751 | quill 752 | quilt 753 | racer 754 | racket 755 | radiator 756 | radio 757 | radio telescope 758 | rain barrel 759 | recreational vehicle 760 | reel 761 | reflex camera 762 | refrigerator 763 | remote control 764 | restaurant 765 | revolver 766 | rifle 767 | rocking chair 768 | rotisserie 769 | rubber eraser 770 | rugby ball 771 | rule 772 | running shoe 773 | safe 774 | safety pin 775 | saltshaker 776 | sandal 777 | sarong 778 | sax 779 | scabbard 780 | scale 781 | school bus 782 | schooner 783 | scoreboard 784 | screen 785 | screw 786 | screwdriver 787 | seat belt 788 | sewing machine 789 | shield 790 | shoe shop 791 | shoji 792 | shopping basket 793 | shopping cart 794 | shovel 795 | shower cap 796 | shower curtain 797 | ski 798 | ski mask 799 | sleeping bag 800 | slide rule 801 | sliding door 802 | slot 803 | snorkel 804 | snowmobile 805 | snowplow 806 | soap dispenser 807 | soccer ball 808 | sock 809 | solar dish 810 | sombrero 811 | soup bowl 812 | space bar 813 | space heater 814 | space shuttle 815 | spatula 816 | speedboat 817 | spider web 818 | spindle 819 | sports car 820 | spotlight 821 | stage 822 | steam locomotive 823 | steel arch bridge 824 | steel drum 825 | stethoscope 826 | stole 827 | stone wall 828 | stopwatch 829 | stove 830 | strainer 831 | streetcar 832 | stretcher 833 | studio couch 834 | stupa 835 | submarine 836 | suit 837 | sundial 838 | sunglass 839 | sunglasses 840 | sunscreen 841 | suspension bridge 842 | swab 843 | sweatshirt 844 | swimming trunks 845 | swing 846 | switch 847 | syringe 848 | table lamp 849 | tank 850 | tape player 851 | teapot 852 | teddy 853 | television 854 | tennis ball 855 | thatch 856 | theater curtain 857 | thimble 858 | thresher 859 | throne 860 | tile roof 861 | toaster 862 | tobacco shop 863 | toilet seat 864 | torch 865 | totem pole 866 | tow truck 867 | toyshop 868 | tractor 869 | trailer truck 870 | tray 871 | trench coat 872 | tricycle 873 | trimaran 874 | tripod 875 | triumphal arch 876 | trolleybus 877 | trombone 878 | tub 879 | turnstile 880 | typewriter keyboard 881 | umbrella 882 | unicycle 883 | upright 884 | vacuum 885 | vase 886 | vault 887 | velvet 888 | vending machine 889 | vestment 890 | viaduct 891 | violin 892 | volleyball 893 | waffle iron 894 | wall clock 895 | wallet 896 | wardrobe 897 | warplane 898 | washbasin 899 | washer 900 | water bottle 901 | water jug 902 | water tower 903 | whiskey jug 904 | whistle 905 | wig 906 | window screen 907 | window shade 908 | Windsor tie 909 | wine bottle 910 | wing 911 | wok 912 | wooden spoon 913 | wool 914 | worm fence 915 | wreck 916 | yawl 917 | yurt 918 | web site 919 | comic book 920 | crossword puzzle 921 | street sign 922 | traffic light 923 | book jacket 924 | menu 925 | plate 926 | guacamole 927 | consomme 928 | hot pot 929 | trifle 930 | ice cream 931 | ice lolly 932 | French loaf 933 | bagel 934 | pretzel 935 | cheeseburger 936 | hotdog 937 | mashed potato 938 | head cabbage 939 | broccoli 940 | cauliflower 941 | zucchini 942 | spaghetti squash 943 | acorn squash 944 | butternut squash 945 | cucumber 946 | artichoke 947 | bell pepper 948 | cardoon 949 | mushroom 950 | Granny Smith 951 | strawberry 952 | orange 953 | lemon 954 | fig 955 | pineapple 956 | banana 957 | jackfruit 958 | custard apple 959 | pomegranate 960 | hay 961 | carbonara 962 | chocolate sauce 963 | dough 964 | meat loaf 965 | pizza 966 | potpie 967 | burrito 968 | red wine 969 | espresso 970 | cup 971 | eggnog 972 | alp 973 | bubble 974 | cliff 975 | coral reef 976 | geyser 977 | lakeside 978 | promontory 979 | sandbar 980 | seashore 981 | valley 982 | volcano 983 | ballplayer 984 | groom 985 | scuba diver 986 | rapeseed 987 | daisy 988 | yellow lady's slipper 989 | corn 990 | acorn 991 | hip 992 | buckeye 993 | coral fungus 994 | agaric 995 | gyromitra 996 | stinkhorn 997 | earthstar 998 | hen-of-the-woods 999 | bolete 1000 | ear 1001 | toilet tissue 1002 | -------------------------------------------------------------------------------- /server-tflite/src/models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WasmEdge/wasmedge_hyper_demo/85db6e7c7d06e96786d8d364f5869d1860c3c026/server-tflite/src/models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite -------------------------------------------------------------------------------- /server/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "wasm32-wasi" 3 | rustflags = ["--cfg", "wasmedge", "--cfg", "tokio_unstable"] 4 | -------------------------------------------------------------------------------- /server/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "wasmedge_hyper_server" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [patch.crates-io] 7 | tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" } 8 | socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" } 9 | hyper = { git = "https://github.com/second-state/wasi_hyper.git", branch = "v0.14.x" } 10 | 11 | [dependencies] 12 | hyper = { version = "0.14", features = ["full"]} 13 | tokio = { version = "1", features = ["rt", "macros", "net", "time", "io-util"]} 14 | -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | # HTTP server example 2 | 3 | ## Quickstart with Docker 4 | 5 | With an WASI-enabled Docker, you just need one line of command to build and run the HTTP server example. For details, refer to the [Dockerfile](../Dockerfile) and [docker-compose.yml](../docker-compose.yml) files. 6 | 7 | ```bash 8 | docker compose build 9 | docker compose run --no-TTY -p 8080:8080 server 10 | ``` 11 | 12 | Next, you can jump directly to the [Test](#test) section. If you want to build and run the application step by step on your own system, read on. 13 | 14 | ## Build 15 | 16 | ```bash 17 | cargo build --target wasm32-wasi --release 18 | ``` 19 | 20 | ## Run 21 | 22 | ```bash 23 | wasmedge target/wasm32-wasi/release/wasmedge_hyper_server.wasm 24 | ``` 25 | 26 | ## Test 27 | 28 | Run the following from another terminal. 29 | 30 | ```bash 31 | $ curl http://localhost:8080/echo -X POST -d "WasmEdge" 32 | WasmEdge 33 | ``` 34 | -------------------------------------------------------------------------------- /server/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::net::SocketAddr; 2 | 3 | use hyper::server::conn::Http; 4 | use hyper::service::service_fn; 5 | use hyper::{Body, Method, Request, Response, StatusCode}; 6 | use tokio::net::TcpListener; 7 | 8 | /// This is our service handler. It receives a Request, routes on its 9 | /// path, and returns a Future of a Response. 10 | async fn echo(req: Request) -> Result, hyper::Error> { 11 | match (req.method(), req.uri().path()) { 12 | // Serve some instructions at / 13 | (&Method::GET, "/") => Ok(Response::new(Body::from( 14 | "Try POSTing data to /echo such as: `curl localhost:8080/echo -XPOST -d 'hello world'`", 15 | ))), 16 | 17 | // Simply echo the body back to the client. 18 | (&Method::POST, "/echo") => Ok(Response::new(req.into_body())), 19 | 20 | (&Method::POST, "/echo/reversed") => { 21 | let whole_body = hyper::body::to_bytes(req.into_body()).await?; 22 | 23 | let reversed_body = whole_body.iter().rev().cloned().collect::>(); 24 | Ok(Response::new(Body::from(reversed_body))) 25 | } 26 | 27 | // Return the 404 Not Found for other routes. 28 | _ => { 29 | let mut not_found = Response::default(); 30 | *not_found.status_mut() = StatusCode::NOT_FOUND; 31 | Ok(not_found) 32 | } 33 | } 34 | } 35 | 36 | #[tokio::main(flavor = "current_thread")] 37 | async fn main() -> Result<(), Box> { 38 | let addr = SocketAddr::from(([0, 0, 0, 0], 8080)); 39 | 40 | let listener = TcpListener::bind(addr).await?; 41 | println!("Listening on http://{}", addr); 42 | loop { 43 | let (stream, _) = listener.accept().await?; 44 | 45 | tokio::task::spawn(async move { 46 | if let Err(err) = Http::new().serve_connection(stream, service_fn(echo)).await { 47 | println!("Error serving connection: {:?}", err); 48 | } 49 | }); 50 | } 51 | } 52 | --------------------------------------------------------------------------------