Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nitindahiya-dev/actix-api

API for performing basic arithmetic operations using Rust's Actix Web framework
https://github.com/nitindahiya-dev/actix-api

actix actix-web rhai rhai-script rust

Last synced: about 2 months ago
JSON representation

API for performing basic arithmetic operations using Rust's Actix Web framework

Awesome Lists containing this project

README

        

# 🌟 Actix Web & Rhai Arithmetic API

Welcome to the **Actix Web & Rhai Arithmetic API**! This project provides a simple yet powerful API for performing basic arithmetic operations using Rust's Actix Web framework and the Rhai scripting language.

## ✨ Features

  • 🚀 Fast and efficient arithmetic operations: multiplication, addition, subtraction, and division.

  • 🛠️ Built with Actix Web for robust server performance.

  • 📜 Utilizes Rhai scripting for flexible and easy-to-read arithmetic logic.



  • ## 📋 Prerequisites

    Before you begin, ensure you have the following installed:

  • 🦀 [Rust](https://www.rust-lang.org/) (latest stable version)

  • 📦 [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)

  • 🌐 [Actix Web](https://actix.rs/)

  • 📝 [Rhai](https://rhai.rs/)
  • ## 📥 Installation

    1. **Clone the repository:**

    ```sh
    git clone https://github.com/nitindahiya199/actix-rhai-arithmetic-api.git
    cd actix-rhai-arithmetic-api
    ```

    🌐 API Endpoints


  • Multiply: GET /multiply/{num1}/{num2}

  • Add: GET /add/{num1}/{num2}

  • Subtract: GET /subtract/{num1}/{num2}

  • Divide: GET /divide/{num1}/{num2}



  • Example Requests


  • Multiply: http://127.0.0.1:8080/multiply/6/7

  • Add: http://127.0.0.1:8080/add/10/5

  • Subtract: http://127.0.0.1:8080/subtract/20/3

  • Divide: http://127.0.0.1:8080/divide/15/3