Choose where you want to run the application server
-
+
{servers.map((srv) => (
))}
diff --git a/src/components/QuickStartList.js b/src/components/QuickStartList.js
index 17f9e6e03..6b601009b 100644
--- a/src/components/QuickStartList.js
+++ b/src/components/QuickStartList.js
@@ -395,6 +395,23 @@ const quickstarts = [
"A sample app to demonstrate Keploy integration capabilities using TypeScript and Nhost.",
link: "/docs/quickstart/samples-typescript/#running-the-app-using-docker",
},
+ // Rust list
+ {
+ title: "Actix + Postgres",
+ language: "Rust",
+ server: "Docker",
+ description:
+ "A sample Actix-web app to demonstrate how seamlessly Keploy integrates with Rust and PostgreSQL.",
+ link: "/docs/quickstart/rust-actix-postgres/#option-1-using-docker-compose-",
+ },
+ {
+ title: "Actix + Postgres",
+ language: "Rust",
+ server: "Local",
+ description:
+ "A sample Actix-web app to demonstrate how seamlessly Keploy integrates with Rust and PostgreSQL.",
+ link: "/docs/quickstart/rust-actix-postgres/#option-2-running-locally-",
+ },
];
export default quickstarts;
diff --git a/static/img/rust-curl-traffic-local.png b/static/img/rust-curl-traffic-local.png
new file mode 100644
index 000000000..8511bd7a2
Binary files /dev/null and b/static/img/rust-curl-traffic-local.png differ
diff --git a/static/img/rust-curl-traffic.png b/static/img/rust-curl-traffic.png
new file mode 100644
index 000000000..04fb0d032
Binary files /dev/null and b/static/img/rust-curl-traffic.png differ
diff --git a/static/img/rust-docker-up.png b/static/img/rust-docker-up.png
new file mode 100644
index 000000000..906cb5d72
Binary files /dev/null and b/static/img/rust-docker-up.png differ
diff --git a/static/img/rust-local-app-starting.png b/static/img/rust-local-app-starting.png
new file mode 100644
index 000000000..7dbf5b016
Binary files /dev/null and b/static/img/rust-local-app-starting.png differ
diff --git a/static/img/rust-local-curl.png b/static/img/rust-local-curl.png
new file mode 100644
index 000000000..998939465
Binary files /dev/null and b/static/img/rust-local-curl.png differ
diff --git a/static/img/rust-local-db-up.png b/static/img/rust-local-db-up.png
new file mode 100644
index 000000000..947f59b1b
Binary files /dev/null and b/static/img/rust-local-db-up.png differ
diff --git a/static/img/rust-local-db.png b/static/img/rust-local-db.png
new file mode 100644
index 000000000..8b508d240
Binary files /dev/null and b/static/img/rust-local-db.png differ
diff --git a/static/img/rust-local-record-running.png b/static/img/rust-local-record-running.png
new file mode 100644
index 000000000..7dbf5b016
Binary files /dev/null and b/static/img/rust-local-record-running.png differ
diff --git a/static/img/rust-local-record-start.png b/static/img/rust-local-record-start.png
new file mode 100644
index 000000000..a393cfbfd
Binary files /dev/null and b/static/img/rust-local-record-start.png differ
diff --git a/static/img/rust-local-record.png b/static/img/rust-local-record.png
new file mode 100644
index 000000000..ee09c31d8
Binary files /dev/null and b/static/img/rust-local-record.png differ
diff --git a/static/img/rust-local-test-run.png b/static/img/rust-local-test-run.png
new file mode 100644
index 000000000..1b9f61365
Binary files /dev/null and b/static/img/rust-local-test-run.png differ
diff --git a/static/img/rust-local-test.png b/static/img/rust-local-test.png
new file mode 100644
index 000000000..1e94e0e8f
Binary files /dev/null and b/static/img/rust-local-test.png differ
diff --git a/static/img/rust-record-captured.png b/static/img/rust-record-captured.png
new file mode 100644
index 000000000..5208e04d5
Binary files /dev/null and b/static/img/rust-record-captured.png differ
diff --git a/static/img/rust-record-start.png b/static/img/rust-record-start.png
new file mode 100644
index 000000000..9be783aa3
Binary files /dev/null and b/static/img/rust-record-start.png differ
diff --git a/static/img/rust-test-run.png b/static/img/rust-test-run.png
new file mode 100644
index 000000000..83efc4977
Binary files /dev/null and b/static/img/rust-test-run.png differ
diff --git a/versioned_docs/version-4.0.0/quickstart/rust-actix-postgres.md b/versioned_docs/version-4.0.0/quickstart/rust-actix-postgres.md
new file mode 100644
index 000000000..95d51688d
--- /dev/null
+++ b/versioned_docs/version-4.0.0/quickstart/rust-actix-postgres.md
@@ -0,0 +1,169 @@
+---
+id: rust-actix-postgres
+title: Application with Postgres
+sidebar_label: Actix + Postgres
+description: A sample Actix-web application to demonstrate Keploy integration capabilities using Rust and Postgres.
+tags:
+ - Rust
+ - Actix
+ - Postgres
+ - Quickstart
+keyword:
+ - Rust
+ - Actix
+ - Postgres
+ - API Test generator
+ - Auto Testcase generation
+---
+
+import InstallReminder from '@site/src/components/InstallReminder';
+
+
+
+## Introduction
+
+This guide will walk you through setting up a simple **Rust** application using **Actix-web** and **Postgres** (via **SQLx**) and integrating it with **Keploy** for automated testing.
+
+We will cover two methods:
+1. **Docker Compose** (Recommended)
+2. **Local Binary**
+
+## Application Setup
+
+### Clone the Repository
+
+```bash
+git clone https://github.com/keploy/samples-rust.git
+cd samples-rust/rust-actix-postgres
+```
+
+## Option 1: Using Docker Compose
+
+This is the easiest way to get started as it sets up both the application and the Postgres database for you.
+
+### 1. Start the Application
+
+```bash
+docker compose up -d
+```
+
+
+
+The application will be running at `http://localhost:8080`.
+
+### 2. Record Test Cases
+
+To record test cases, we use the `keploy record` command. This will start your application (via Docker) and proxy the traffic to record interactions.
+
+```bash
+keploy record -c "docker compose up" --container-name rust-app
+```
+
+
+
+Now, generate some traffic using `curl` or Postman:
+
+**Create an Item:**
+
+```bash
+curl -X POST http://localhost:8080/items \
+ -H "Content-Type: application/json" \
+ -d '{"name": "Keploy Guide", "description": "Writing tests made easy"}'
+```
+
+**Get Items:**
+
+```bash
+curl http://localhost:8080/items
+```
+
+
+
+Stop the recording by pressing `Ctrl+C`. You should see a `keploy/` directory created with your test cases.
+
+
+
+### 3. Replay Test Cases
+
+Now, let's verify the recorded test cases.
+
+```bash
+keploy test -c "docker compose up" --container-name rust-app --delay 10
+```
+
+
+
+Keploy will compare the current responses with the recorded ones.
+
+---
+
+## Option 2: Running Locally
+
+If you prefer to run the Rust binary directly, follow these steps.
+
+### 1. Start the Database
+
+We'll use Docker to spin up the Postgres database only.
+
+```bash
+docker compose up db -d
+```
+
+
+
+### 2. Configure Environment
+
+To connect to the database, you need to set the connection string. You can either create a `.env` file or export the variable.
+
+```bash
+export DATABASE_URL=postgres://postgres:password@localhost:5432/keploy
+```
+
+### 3. Record Test Cases
+
+Now, run the application with Keploy to record traffic.
+
+```bash
+keploy record -c "cargo run"
+```
+
+
+
+Once the application matches `Server running at http://0.0.0.0:8080`, generate some traffic.
+
+**Create an Item:**
+
+```bash
+curl -X POST http://localhost:8080/items \
+ -H "Content-Type: application/json" \
+ -d '{"name": "Keploy Guide", "description": "Writing tests made easy"}'
+```
+
+**Get Items:**
+
+```bash
+curl http://localhost:8080/items
+```
+
+
+
+Stop the recording by pressing `Ctrl+C`.
+
+### 4. Replay Test Cases
+
+Now, let's verify the recorded test cases.
+
+```bash
+keploy test -c "cargo run" --delay 10
+```
+
+
+
+Keploy will run the tests and show the results in the terminal.
+
+## Summary
+
+You have successfully:
+1. Set up a Rust Actix-web application.
+2. Recorded API interactions using Keploy.
+3. Replayed and validated the interactions.
diff --git a/versioned_sidebars/version-4.0.0-sidebars.json b/versioned_sidebars/version-4.0.0-sidebars.json
index 6399724df..5dfae67f6 100644
--- a/versioned_sidebars/version-4.0.0-sidebars.json
+++ b/versioned_sidebars/version-4.0.0-sidebars.json
@@ -118,6 +118,15 @@
"items": [
"quickstart/samples-csharp"
]
+ },
+ {
+ "type": "category",
+ "label": "Rust",
+ "collapsible": true,
+ "collapsed": true,
+ "items": [
+ "quickstart/rust-actix-postgres"
+ ]
}
]
},