Rust API deployed on Vercel.

Overview

Rust Vercel API

Introduction

This project is a Rust API deployed on Vercel. It is designed for users to build Rust code which can then be called using POST requests. This repository is an easy to use Rust-Vercel API that can be amended for your own requirements.

Example

There are 3 main API calls in the repository and they are outlined below.

  1. A basic indexing call:

    POST https://vercel-rust-two.vercel.app/api/user/[1]
    Content-Type: application/json
    
    {}

    This returns the number received at the end of the url. In this case we have 1.

    [
    1
    ]
  2. A random planet generator.

    POST https://vercel-rust-two.vercel.app/api/simple
    Content-Type: application/json
    
    {}

    This returns a randomly generated planet in our Solar System.

    {
        "message": "I choose the planet, Earth!"
    }
  3. A random planet generator with a specified input.

    POST https://vercel-rust-two.vercel.app/api/complex
    Content-Type: application/json
    
    {
        "name": "Ellie"
    }

    This returns a randomly generated planet in our Solar System.

    {
        "message": "Ellie says: I choose the planet, Uranus!"
    }

Using this Rust API for Your Own Projects

This repository can be cloned and used for your own personal projects. To clone the repository:

git clone https://github.com/ellie-sleightholm/vercel-rust.git

Once cloned, you can use the contents of this repository in your own personal repository. It is important that you have your repository linked to Vercel ready for deployment. Then you're ready to go! Make changes and push to GitHub which will create your own personal URL. You can use this when making POST requests (see here.)

You might also like...
Simple fake AWS Cognito User Pool API server for development.

Fakey Cognito 🏡 Homepage Simple fake AWS Cognito API server for development. ✅ Implemented features AdminXxx on User Pools API. Get Started # run wit

Femtorinth is a library to interact with a sub-set of the Modrinth API.

Femtorinth Femtorinth is a rust library to interact with a sub-set of the Modrinth api, it only includes the api calls that don't need auth (a.k.a onl

C API to SpringQL (for embedded mode)

SpringQL C Client This repository is a C client for SpringQL and provides it provides: springql.h: C header file. libspringql_client.{so,dylib}: Share

Stream-based FSEvents API bindings.

fsevent-stream Stream-based FSEvents API bindings. Features Support directory-granular and file-granular events. Retrieve related file inode with kFSE

Interact with the crate's API

cargo-api Interact with the crate's API Documentation Installation Getting Started Reference FAQ Contribute CHANGELOG Install Download a pre-built bin

This article is about the unsound api which I found in owning_ref. Owning_ref is a library that has 11 million all-time downloads and 60 reverse dependencies.

Unsoundness in owning_ref This article is about the unsound api which I found in owning_ref. Owning_ref is a library that has 11 million all-time down

weggli-native a "native" C API for Google's weggli

weggli-native a "native" C API for Google's weggli

Manage self-hosted Supabase instances with an easy to use API & Web Portal (soon)

SupaManager A project by Harry Bairstow; Manage self-hosted Supabase instances with an easy to use API & Web Portal (soon) ⚠️ Note: The project is in

Bindings to the Tauri API for projects using wasm-bindgen

tauri-sys Raw bindings to the Tauri API for projects using wasm-bindgen Installation This crate is not yet published to crates.io, so you need to use

Owner
Ellie Sleightholm
Current Astrodynamics Software Engineer and Cambridge Mathematics Graduate 🚀
Ellie Sleightholm
High level rust abstractions for the libretro API

libretro-rs Design Philosophy The approach to this crate can best be summarized as wanting to expose all functionality, even if not idiomatically. The

null 9 Dec 25, 2022
Rust library for interacting with the VTube Studio API

vtubestudio-rs A library for interacting with the VTube Studio API. Basic usage This example creates a Client using the provided builder, which: conne

null 6 Dec 4, 2022
⚡️ Fast MagicString port driven by Rust and N-API

magic-string-rs 100% API compatible (port) MagicString by Rich-Harris implementation for Node and modern browsers, also, for rust, of course. Installa

Hana 35 Nov 21, 2022
ncnn Rust API.

rust-ncnn ncnn Rust API. Prequisition Rust Env $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh CMake >= 3.12 Rust cmake needs --paral

null 11 Dec 27, 2022
Rust crate for creating filters with DirectX shaders. Includes Scale, Color conversion using DirectX api.

DxFilter Scale and ColorConversion done with DirectX filters. You can also create your own filters with the provided api. Crate contains various tools

null 4 Aug 13, 2022
Examples of how to use Rust with Serverless Framework, Lambda, API Gateway v1 and v2, SQS, GraphQL, etc

Rust Serverless Examples All examples live in their own directories: project: there is nothing here, just a simple cargo new project_name with a custo

Fernando Daciuk 9 Dec 17, 2022
prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage.

prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage. Project Status We currently support the

William Findlay 4 Dec 29, 2022
An ActivityPub home server written in Rust, implementing the Mastodon API.

Tafarn An ActivityPub home server written in Rust, implementing the Mastodon API. At present no web UI is provided, the API is the only way to interac

✨ Q (it/its) ✨ 12 Jan 22, 2023
Rust wrapper for the Google Places API. Access their hundreds of millions of places, reviews, and ratings.

Google Places API Working Examples cargo run --example nearby_search cargo run --example place_details cargo run --example find_place cargo run --exam

Jared Ucherek 4 Jun 12, 2023
A scrapper that abstracts the IQ Option API calls into a Rust package.

IQ Option API - In Rust An abstraction of IQ Options API calls in a Rust library. License Licensed under either of MIT license (LICENSE-MIT or https:/

Vinícius Roque 8 Jul 17, 2023