Command line tool for interacting with flows.network platform
Your operation system needs to be Linux. And you may need to install clang, pkg-config and openssl. Take Ubuntu as example:
sudo apt install clang pkg-config openssl libssl-dev
You need to install WasmEdge runtime to run the wasm in your local environment.
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasmedge_rustls
For the reason that flowsnet-cli depends on the version of your WasmEdge, so we recommand you to compile it manullay.
flowsnet-cli requires three arguments:
-f, --flow <FLOW> Flow identity in flows.network
-w, --wasm <WASM> Wasm file path in the local file system
-p, --port <PORT> Port of the local service
and two optionals:
-d, --work-dir <WORK_DIR> Path for env file and mounting volume in the local file system [default: .]
-e, --env-file <ENV_FILE> Name of the env file which is to be written [default: .flowsnet.env]
Copy the example env file and write your own in it. Beware to rename the file if you want to customize in the argument above.
cp .flowsnet.env.example .flowsnet.env
You can find the flow identity in your flow detail on the flows.network platform.
The wasm path is the path of the wasm file, which is built from your rust function code.
flowsnet-cli will start a server to receive requests from the flows.network platform, and the port is for the service to listen.