<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn" -->

---
title: Deploying Rust to production checklist | daily.dev
description: A practical checklist for deploying Rust services and CLI binaries to production, covering: using optimized release profiles (opt-level=3, LTO, strip),...
canonical: https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Deploying Rust to production checklist | daily.dev
og:description: A practical checklist for deploying Rust services and CLI binaries to production, covering: using optimized release profiles (opt-level=3, LTO, strip),...
og:url: https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn
og:image: https://api.daily.dev/og/posts/xZotq5gdn.png
og:image:alt: Deploying Rust to production checklist
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 Rust to production checklist

**[Sylvain Kerkour](https://daily.dev/sources/kerkour)** · 7 min read · 0 upvotes · 0 comments

## Summary

A practical checklist for deploying Rust services and CLI binaries to production, covering: using optimized release profiles (opt-level=3, LTO, strip), Makefile-based workflows, the lld linker for faster builds, replacing bloated dependencies (e.g. swapping aws-sdk-s3 for object_store), building static MUSL binaries, replacing the default allocator with mimalloc (with secure mode enabled), security sandboxing via the landlock crate, minimal Docker images using FROM scratch or Alpine, and dependency auditing with cargo-audit and cargo-vet.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://kerkour.com/rust-production-checklist>

## Questions this post answers

### Why should I use mimalloc instead of the default allocator in Rust MUSL builds?

MUSL's malloc implementation performs poorly for high-performance services. Replacing it with mimalloc reduces memory fragmentation, improves runtime performance, and lowers overall memory usage. Enabling mimalloc's secure mode adds hardening with only a ~10% performance penalty, which is acceptable because Rust services are almost never CPU-bound — the bottleneck is typically the database or I/O.

_Rust teams shipping MUSL services track allocator trade-offs like these on daily.dev._

### How do I configure the lld linker for Rust targets other than x86_64-unknown-linux-gnu?

Since Rust 1.90, lld is the default linker only for x86_64-unknown-linux-gnu. For other targets, add explicit rustflags in .cargo/config.toml: set link-args=-fuse-ld=lld for x86_64-unknown-linux-musl, aarch64-unknown-linux-gnu, and aarch64-unknown-linux-musl. This can cut development build times from 5+ seconds to 2 seconds or less.

_Developers optimizing Rust compile times across targets find relevant updates on daily.dev._

### What cargo-audit and cargo-vet do and how do they differ for Rust dependency security?

cargo-audit checks your Cargo.lock against the RustSec advisory database for known vulnerabilities and abandoned crates. cargo-vet ensures third-party crates have been audited by trusted organizations — Google and Mozilla both publish their audit results publicly and you can import them directly into cargo-vet, giving you coverage over a large portion of the crate ecosystem without auditing everything yourself.

_Rust teams managing supply chain risk keep up with ecosystem security news on daily.dev._

## Similar posts on daily.dev

- [Hardening Rust Code For Production](https://daily.dev/posts/hardening-rust-code-for-production-lyax4vift) · corrode · 1 upvotes · 0 comments
- [Medium](https://daily.dev/posts/medium-j5k11rvds) · Medium · 0 upvotes · 0 comments
- [Small and secure Docker images for Rust: scratch vs alpine vs debian](https://daily.dev/posts/small-and-secure-docker-images-for-rust-scratch-vs-alpine-vs-debian-31lvdlshh) · Sylvain Kerkour · 0 upvotes · 0 comments
- [Rust slow to compile? Here’s how to speed it up](https://daily.dev/posts/rust-slow-to-compile-here-s-how-to-speed-it-up-v68bgtj7l) · InfoWorld · 0 upvotes · 0 comments

---

Tags: [#docker](https://daily.dev/tags/docker), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn)

```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 Rust to production checklist","url":"https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn"},"datePublished":"2026-08-11T08:55:26.478Z","dateModified":"2026-08-11T09:34:34.958Z","description":"A practical checklist for deploying Rust services and CLI binaries to production, covering: using optimized release profiles (opt-level=3, LTO, strip),...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Sylvain Kerkour","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":"Sylvain Kerkour","logo":"https://media.daily.dev/image/upload/s--3ngWt4Yp--/f_auto,q_auto/v1786438308/logos/kerkour?_a=BAMAMicg0","url":"https://daily.dev/sources/kerkour"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"docker,rust","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sylvain Kerkour","item":"https://daily.dev/sources/kerkour"},{"@type":"ListItem","position":3,"name":"Deploying Rust to production checklist"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/deploying-rust-to-production-checklist-xzotq5gdn#faq","mainEntity":[{"@type":"Question","name":"Why should I use mimalloc instead of the default allocator in Rust MUSL builds?","acceptedAnswer":{"@type":"Answer","text":"MUSL's malloc implementation performs poorly for high-performance services. Replacing it with mimalloc reduces memory fragmentation, improves runtime performance, and lowers overall memory usage. Enabling mimalloc's secure mode adds hardening with only a ~10% performance penalty, which is acceptable because Rust services are almost never CPU-bound — the bottleneck is typically the database or I/O. Rust teams shipping MUSL services track allocator trade-offs like these on daily.dev."}},{"@type":"Question","name":"How do I configure the lld linker for Rust targets other than x86_64-unknown-linux-gnu?","acceptedAnswer":{"@type":"Answer","text":"Since Rust 1.90, lld is the default linker only for x86_64-unknown-linux-gnu. For other targets, add explicit rustflags in .cargo/config.toml: set link-args=-fuse-ld=lld for x86_64-unknown-linux-musl, aarch64-unknown-linux-gnu, and aarch64-unknown-linux-musl. This can cut development build times from 5+ seconds to 2 seconds or less. Developers optimizing Rust compile times across targets find relevant updates on daily.dev."}},{"@type":"Question","name":"What cargo-audit and cargo-vet do and how do they differ for Rust dependency security?","acceptedAnswer":{"@type":"Answer","text":"cargo-audit checks your Cargo.lock against the RustSec advisory database for known vulnerabilities and abandoned crates. cargo-vet ensures third-party crates have been audited by trusted organizations — Google and Mozilla both publish their audit results publicly and you can import them directly into cargo-vet, giving you coverage over a large portion of the crate ecosystem without auditing everything yourself. Rust teams managing supply chain risk keep up with ecosystem security news on daily.dev."}}]}
```

