You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/user_guide/instructions_to_run_generated_code.md
+58-1
Original file line number
Diff line number
Diff line change
@@ -1010,7 +1010,64 @@ cargo run
1010
1010
1011
1011
## Rust (ureq)
1012
1012
1013
-
TODO
1013
+
### 1. Download and Install Rust:
1014
+
1015
+
#### **Windows**
1016
+
1. Download and install `rustup` from [Rustup Official Site](https://rustup.rs).
1017
+
2. Run the installer (`rustup-init.exe`) and follow the instructions.
1018
+
3. Restart your terminal (Command Prompt or PowerShell).
1019
+
4. Verify the installation:
1020
+
```sh
1021
+
rustc --version
1022
+
cargo --version
1023
+
```
1024
+
1025
+
#### **MacOS/Linux**
1026
+
1. Run the following in your terminal:
1027
+
```sh
1028
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
1029
+
```
1030
+
then follow the on-screen instructions.
1031
+
1032
+
2. Restart the terminal and verify:
1033
+
```sh
1034
+
rustc --version
1035
+
cargo --version
1036
+
```
1037
+
1038
+
> Note: If you prefer not to use rustup for some reason, please see the Other [Rust Installation Methods](https://forge.rust-lang.org/infra/other-installation-methods.html) page for more options.
1039
+
1040
+
### 2. Set Up a New Rust Project
1041
+
1. Open a terminal and create a new Rust project:
1042
+
```sh
1043
+
cargo new ureq-demo
1044
+
```
1045
+
2. Navigate into the project directory:
1046
+
```sh
1047
+
cd ureq-demo
1048
+
```
1049
+
1050
+
or open this project directory in your preferred code editor.
1051
+
1052
+
### 3. Add `ureq` Dependency
1053
+
1054
+
Run the following command to add dependencies:
1055
+
```sh
1056
+
cargo add ureq
1057
+
```
1058
+
Run the following command to fetch dependencies:
1059
+
```sh
1060
+
cargo build
1061
+
```
1062
+
1063
+
### 4. Execute code
1064
+
1. Copy the generated code from API Dash.
1065
+
2. Paste the code into your project's `src/main.rs` directory
0 commit comments