YouTube Channel Subscribers LinkedIn


Rust SurrealDB API (uses Axum)

About The Project

Akhil - I wanted to build an example that uses SurrealDB with Rust. I used SurrealDB a while back and noticed how simple it was to install it - just one command and ZERO configs and also start the DB with the username and password of my choice. I LOVED it and along with Rust, it's the perfect combo!

(back to top)

Built With

  • Rust
  • Axum
  • SurrealDB

Getting Started

Prerequisites

You need SurrealDB on your PC. If you're on linux this is how to install it - curl -sSf https://install.surrealdb.com | sh

mac - brew install surrealdb/tap/surreal windows - iwr https://windows.surrealdb.com -useb | iex

and then start surreal db with this command that sets the username and password - surreal start --user root --pass root --auth memory

If you to want the feature to run in watch mode, install cargo-watch

  • cargo-watch
    cargo install cargo-watch

Installation

  1. Clone the repo
    git clone https://github.com/akhilsharma90/rust_surrealdb_API.git
  2. Build the project to install the dependecies
    cargo build
  3. Run with
    cargo run
    Or, for more dynamic development, run in watch mode
    cargo watch -q -c -w src/ -x run
    -q quiet mode
    -c clear the console on reload
    -w watch all change to files under src/
    -x executes run command

(back to top)

Roadmap

  • Working api structure
  • Clean Architecure
  • Database

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Akhil Sharma - @akhilairi - akhil.sharma@myrl.tech

Project Link: https://github.com/akhilsharma90/rust_surrealdb_API

(back to top)

Acknowledgments

(back to top)