This is an automated email from the ASF dual-hosted git repository.

yangyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 4caf2e5  docs:start examples (#73)
4caf2e5 is described below

commit 4caf2e5829db11cd2c5353bca665326dbe8ed926
Author: baerwang <[email protected]>
AuthorDate: Mon Nov 21 22:53:30 2022 +0800

    docs:start examples (#73)
---
 .gitignore                         |   1 +
 README_CN.md                       |   2 +-
 docs/images/eamples/client.png     | Bin 0 -> 284895 bytes
 docs/images/eamples/dir-server.png | Bin 0 -> 53115 bytes
 docs/images/eamples/server.png     | Bin 0 -> 297187 bytes
 examples/READMED.md                |  58 +++++++++++++++++++++++++++++++++++++
 6 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 6a358bd..8e58bcf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@ Cargo.lock
 **/*.rs.bk
 .vscode/
 .idea/
+.DS_Store
 helloworld
\ No newline at end of file
diff --git a/README_CN.md b/README_CN.md
index c762789..5e5b969 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -32,7 +32,7 @@ Dubbo-rust 目前还在开发阶段. 截至目前, 已经实现了基于HTTP2的
 ## 开始使用
 
 - Dubbo-rust 快速开始:  
[中文](https://dubbo.apache.org/zh/docs3-v2/rust-sdk/quick-start/), English
-- Dubbo-rust 教程:  
[Examples](https://github.com/apache/dubbo-rust/tree/main/examples)
+- Dubbo-rust 教程:  [Examples](examples/READMED.md)
 
 ## 项目结构
 
diff --git a/docs/images/eamples/client.png b/docs/images/eamples/client.png
new file mode 100644
index 0000000..1b6f085
Binary files /dev/null and b/docs/images/eamples/client.png differ
diff --git a/docs/images/eamples/dir-server.png 
b/docs/images/eamples/dir-server.png
new file mode 100644
index 0000000..73efdfe
Binary files /dev/null and b/docs/images/eamples/dir-server.png differ
diff --git a/docs/images/eamples/server.png b/docs/images/eamples/server.png
new file mode 100644
index 0000000..411af13
Binary files /dev/null and b/docs/images/eamples/server.png differ
diff --git a/examples/READMED.md b/examples/READMED.md
new file mode 100644
index 0000000..e2e94ac
--- /dev/null
+++ b/examples/READMED.md
@@ -0,0 +1,58 @@
+# 使用VS Code 运行 Dubbo-rust
+
+#### 首先我们拉下 Dubbo-rust 项目
+```shell
+git clone https://github.com/apache/dubbo-rust.git
+```
+#### 打开编辑器准备启动项目
+打开对应的 **Dubbo-rust** 项目
+在当前目录下创建一个新文件夹,名称为 **.vscode**
+
+```shell
+mkdir .vscode
+```
+
+创建个json文件,名称为launch.json,该文件 **.vscode** 目录下 将下文的内容复制到launch.json中
+
+```json
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: 
https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "lldb",
+            "request": "launch",
+            "name": "greeter-server",
+            "program": "${workspaceFolder}/target/debug/greeter-server",
+            "args": [],
+            "cwd": "${workspaceFolder}/examples/greeter/",
+            "terminal": "console",
+            "env": { }
+        },
+        {
+            "type": "lldb",
+            "request": "launch",
+            "name": "greeter-client",
+            "program": "${workspaceFolder}/target/debug/greeter-client",
+            "args": [],
+            "cwd": "${workspaceFolder}/examples/greeter/",
+            "terminal": "console",
+            "env": {}
+        },
+    ]
+}
+```
+
+#### 打开 examples/greeter/src/greeter 目录,选择server.rs
+
+![image.png](../docs/images/eamples/dir-server.png)
+
+#### 选择左侧的运行按钮,启动 server 服务
+
+![image.png](../docs/images/eamples/server.png)
+
+##### 启动 client 访问server 端
+
+![image.png](../docs/images/eamples/client.png)

Reply via email to