Rust
MongoDB Developer Center
chevron-right
Developer Topics
chevron-right
Languages
chevron-right
Rust
chevron-right

Using Rust Web Development Frameworks with MongoDB

Rachelle PalmerPublished Jun 11, 2022 • Updated Jun 13, 2022
MongoDBRust
facebook icontwitter iconlinkedin icon
random alt
Rate this article
star-empty
star-empty
star-empty
star-empty
star-empty

Introduction

So you've decided to write a Rust application with MongoDB, and you're wondering which of the top web development frameworks to use? Below, we give some suggestions and resources for how to:
  1. Use MongoDB with Actix and Rust
  2. Use MongoDB with Rocket.rs and Rust
The TLDR is that any of the popular Rust frameworks can be used with MongoDB, and we have code examples, tutorials, and other resources to guide you.
Building MongoDB Rust Apps with Actix
You can find a working example of using MongoDB with Actix in the databases directory under actix's github
here
, but otherwise, if you're looking to build a REST API with Rust and MongoDB, using Actix along the way,
this tutorial
is one of the better ones we've seen.
Building MongoDB Rust Apps with Rocket.rs
Prefer
Rocket
? Rocket is fast, secure, and type safe framework that is low on boilerplate. It's easy to use MongoDB with Rocket to build Rust applications. There's a tutorial on medium we particularly like - that's
here
- on building a REST API with Rust and MongoDB and Rocket.
If all you want is to see a code example on github, we recommend
this one.
.

Copy Link
facebook icontwitter iconlinkedin icon
Rate this article
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Quickstart
Getting Started with Deno & MongoDB

May 12, 2022
Article
How Prisma Introspects a Schema from a MongoDB Database

May 19, 2022
Quickstart
Get Started with Rust and MongoDB

May 20, 2022
Quickstart
Getting Started with Aggregation Pipelines in Rust

May 12, 2022
Table of Contents
  • Introduction