Skip to main content Skip to navigation

Documentation

Everything you need to build irresistible applications

Building with Rust

Create blazingly fast, memory-safe systems with the most loved programming language

Why Choose Rust?

๐Ÿ›ก๏ธ Memory Safety

Guaranteed memory safety without garbage collection. No null pointer crashes or data races.

โšก Zero-Cost Abstractions

High-level features compile to efficient machine code. Performance of C with safety.

๐Ÿ”ง Modern Tooling

Cargo package manager, built-in testing, documentation, and formatting tools.

๐Ÿฆ€ Fearless Concurrency

Write concurrent code without fear. The compiler prevents data races.

What Can You Build?

Systems Programming

Memory safety without GC, zero-cost abstractions, bare metal performance

Frameworks:

tokioasync-stdembedded-halno_std

Examples:

  • Operating systems
  • Device drivers
  • Embedded systems
  • Game engines

Web Services

Blazing fast, concurrent by default, memory efficient

Frameworks:

Actix-webRocketAxumWarp

Examples:

  • REST APIs
  • WebSocket servers
  • GraphQL servers
  • Microservices

Command Line Tools

Fast startup, small binaries, cross-platform compilation

Frameworks:

clapstructoptcrosstermtui

Examples:

  • CLI utilities
  • Build tools
  • Dev tools
  • System utilities

WebAssembly

Near-native browser performance, small bundle size, type safety

Frameworks:

wasm-bindgenwasm-packyewtrunk

Examples:

  • Browser apps
  • WASM modules
  • Game engines
  • Crypto libraries

Natural Language Examples

Describe your Rust project in plain English:

"Create a Rust web server with async request handling and PostgreSQL"
โ†’

High-performance API with connection pooling

"Build a Rust CLI tool for file processing with progress bars"
โ†’

Fast command-line utility with visual feedback

"Design a Rust game engine with ECS architecture and WGPU rendering"
โ†’

Performance-focused game engine with modern graphics

Rust Best Practices

Ownership & Borrowing

  • Understand the borrow checker
  • Use references when possible
  • Clone only when necessary
  • Leverage lifetimes properly

Error Handling

  • Use Result<T, E> everywhere
  • Create custom error types
  • Propagate with ? operator
  • Handle all error cases

Performance

  • Profile before optimizing
  • Use iterators over loops
  • Minimize allocations
  • Leverage SIMD when needed

Idiomatic Rust

  • Follow naming conventions
  • Use pattern matching
  • Implement standard traits
  • Write comprehensive tests

Quick Start Templates

๐ŸŒ Web API

Async web server with database and authentication

"Create a Rust API with Actix-web and JWT"

๐Ÿ”ง CLI Tool

Command-line application with argument parsing

"Build a Rust file processing CLI"

๐ŸŽฎ Game Engine

High-performance game with ECS and rendering

"Design a Rust 2D game engine"

๐ŸŒŠ WASM App

WebAssembly application for the browser

"Create a Rust WASM image processor"

Pro Tips

๐Ÿ“š Read the Book

The Rust Programming Language book is essential - read it thoroughly

๐Ÿค Work with the Borrow Checker

Don't fight it - the borrow checker is your friend preventing bugs

๐Ÿ“ฆ Use Crates.io

Don't reinvent the wheel - amazing crates exist for most needs

๐Ÿงช Clippy & Rustfmt

Use clippy for linting and rustfmt for consistent code style