<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa" -->

---
title: Deploying a REST API with Rust, Diesel, Rocket, and...
description: A step-by-step guide to building and deploying a CRUD REST API using Rust, the Rocket web framework, Diesel ORM, and MySQL on Google Cloud Run. Covers project...
canonical: https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Deploying a REST API with Rust, Diesel, Rocket, and MySQL on Google Cloud Run | daily.dev
og:description: A step-by-step guide to building and deploying a CRUD REST API using Rust, the Rocket web framework, Diesel ORM, and MySQL on Google Cloud Run. Covers project...
og:url: https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa
og:image: https://api.daily.dev/og/posts/UkwL13saA.png
og:image:alt: Deploying a REST API with Rust, Diesel, Rocket, and MySQL on Google Cloud Run
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploying a REST API with Rust, Diesel, Rocket, and MySQL on Google Cloud Run

**[Casey Primozic](https://daily.dev/sources/cprimozic)** · 17 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide to building and deploying a CRUD REST API using Rust, the Rocket web framework, Diesel ORM, and MySQL on Google Cloud Run. Covers project setup, database migrations, model and route definitions, CORS handling via Rocket Fairings, Dockerizing with a multi-stage build, pushing to Google Container Registry, and deploying to Cloud Run. Also includes a brief performance benchmark showing ~500ms latency due to Cloud Run overhead, with notes on cost efficiency and scalability.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cprimozic.net/blog/rust-rocket-cloud-run/>

## Similar posts on daily.dev

- [Deploying Containerized NestJS Applications on GCP Using Cloud Run](https://daily.dev/posts/deploying-containerized-nestjs-applications-on-gcp-using-cloud-run-dpuwleooa) · Telerik · 0 upvotes · 0 comments
- [Now available: Rust SDK for Google Cloud](https://daily.dev/posts/now-available-rust-sdk-for-google-cloud-2pmhrnkst) · Google Cloud · 35 upvotes · 0 comments
- [Building scalable backend services with Rust and PostgreSQL](https://daily.dev/posts/building-scalable-backend-services-with-rust-and-postgresql-tlwj69w1v) · Sylvain Kerkour · 6 upvotes · 3 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#gcp](https://daily.dev/tags/gcp), [#rest-api](https://daily.dev/tags/rest-api)

[View this post on daily.dev](https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Deploying a REST API with Rust, Diesel, Rocket, and MySQL on Google Cloud Run","url":"https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa"},"datePublished":"2026-03-31T12:29:41.862Z","dateModified":"2026-03-31T12:47:49.456Z","description":"A step-by-step guide to building and deploying a CRUD REST API using Rust, the Rocket web framework, Diesel ORM, and MySQL on Google Cloud Run. Covers project...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"Casey Primozic","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Casey Primozic","logo":"https://media.daily.dev/image/upload/s--LrHsyt2T--/f_auto/v1692632054/squad_placeholder_sfwkmj","url":"https://daily.dev/sources/cprimozic"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/deploying-a-rest-api-with-rust-diesel-rocket-and-mysql-on-google-cloud-run-ukwl13saa","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rust,gcp,rest-api","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Casey Primozic","item":"https://daily.dev/sources/cprimozic"},{"@type":"ListItem","position":3,"name":"Deploying a REST API with Rust, Diesel, Rocket, and MySQL on Google Cloud Run"}]}
```

