瀏覽代碼

updated README.md

Yurii Sokolovskyi 2 周之前
父節點
當前提交
9158e3deac
共有 1 個文件被更改,包括 15 次插入10 次删除
  1. 15 10
      README.md

+ 15 - 10
README.md

@@ -5,30 +5,35 @@ Installation and usage
 ----------------------
 
 Clone the project:
-```bash
+```shell
 git clone https://git.42d.io/reda/crabmail
 ```
 Install dependencies:
-```bash
+```shell
 cd crabmail && cargo install --path .
 ```
-Add WASM target for cargo toolchain:
-```bash
-rustup target add wasm32-wasi
-```
 For Linux environment build and run:
-```bash
+```shell
 cargo run --release
 ```
+For WASI environment install Wasmedge
+```shell
+curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash
+```
+Add WASM target for cargo toolchain:
+```shell
+rustup target add wasm32-wasi
+```
 For WASI environment build:
-```bash
+```shell
 cargo build --target wasm32-wasi --release
 ```
 For WASI environment run:
-Note: To give WASI access to a directory, you need to use the --dir flag and specify the path in the {actual_path}:{virtual_path} format, where {actual_path} should be replaced with the actual path in the local file system, and {virtual_path} should represent the virtual path that WASI will use in the code.
-```bash
+```shell
 wasmedge --dir {path with config} --dir {path to store results} --dir {path with maildir} {path to .wasm file} -h -c {path to the config file} -d {path to the result dir} -m {path to maildir}
 ```
+Note: To give WASI access to a directory, you need to use the --dir flag and specify the path in the {actual_path}:{virtual_path} format, where {actual_path} should be replaced with the actual path in the local file system, and {virtual_path} should represent the virtual path that WASI will use in the code.
+<br><br>
 For WASI environment run example:
 ```
 wasmedge --dir /home/yura/crabmailConfig/:/home/yura/crabmailConfig/ --dir /home/yura/crabmailResult/:/home/yura/crabmailResult/ --dir /home/yura/lists/:/home/yura/lists/ ./target/wasm32-wasi/release/crabmail.wasm -h -c /home/yura/crabmailConfig/crabmail.conf -d /home/yura/crabmailResult -m /home/yura/lists/