Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

richardchien/anna-client-tokio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anna-client-tokio

anna-client-tokio is a Rust client for anna-rs based on Tokio for WasmEdge.

Usage

First, run routing node and KVS node of the adapted version of anna-rs:

$ cd anna-rs
$ cp example-config.yml config.yml
$ ANNA_PUBLIC_IP=127.0.0.1 ANNA_TCP_PORT_BASE=12340 cargo run --bin routing -- config.yml
$ # in another shell instance
$ ANNA_PUBLIC_IP=127.0.0.1 cargo run --bin kvs -- config.yml

Then, build and run the test app of anna-client-tokio:

$ cd anna-client-tokio
$ cargo build --target wasm32-wasi
$ /path/to/wasmedge --dir .:. target/wasm32-wasi/debug/testng.wasm -h 127.0.0.1 -p 12340 -r 2
# -h: IP address of routing node
# -p: Base TCP port of routing threads
# -r: Number of routinge threads