Skip to content
Search

Rust

lastmod 2026-05-13created 2016-09-21102 edits

Rust is a general-purpose programming language developed by Mozilla Research. It was designed to be a "safe, concurrent, practical" language, and supports pure functional programming, actor-based concurrent programming, imperative programming, and object-oriented programming styles.

Categories

Projects

  • Tokio - async io
  • Artichoke - Ruby made with Rust
  • RustPython - Python made with Rust
  • wasm-bindgen - wasm module.
  • Zaplib - Open source for accelerating web apps with Rust and WASM
  • Bevy - Rust-based open-source 2D/3D game engine
  • Graphul - Rust web framework inspired by Express
  • Dioxus - UI library for Rust inspired by React
  • Nannou - Open-source creative coding framework
    • A library that lets media artists, hackers, and designers express themselves with simple, fast, and reliable code
      • Enables artistic expression using graphics, LEDs, lasers, audio, GUIs, and more
  • Arroyo - Distributed stream processing engine written in Rust
  • mapgen.rs - Game dungeon generation.
  • Cacao - Building macOS/iOS apps with Rust
  • redb - Embedded key/value store written in pure Rust
  • ruff - Fast Python linter implemented in Rust
  • Uv - Ultra-fast Python packaging tool implemented in Rust
  • gccrs - Alternative compiler for Rust
  • Rust-Query - Safe RDB queries using the Rust type system
  • Tuono - Rust-based full-stack React web framework
  • ArkFlow - High-performance Rust stream processing engine
  • Crabtime - Let's use Zig's Comptime in Rust
  • Xee - Modern XPath and XSLT engine implemented in Rust
  • Shezem-rs - Rust-based high-speed audio fingerprinting system
  • Lstr - Rust-based fast directory tree viewer
  • PyO3 - Rust bindings for the Python interpreter
  • Rhai - Embedded scripting language for Rust
  • GPUI
  • GPUI Component - UI component library for building cross-platform desktop applications with the GPUI framework
  • Burn - Next-generation Tensor library combining flexibility, efficiency, and portability
  • hwpers - Open-source HWP parser/writer made with Rust
  • Lisette - Small language based on Rust syntax that compiles to the Go runtime
  • cargo-mutants - cargo-mutants is a mutation testing tool for Rust

Database Libraries

  • Comparison of 4 Rust backend DB libraries | GeekNews
  • Diesel (v2.3.6, January 2026) — Full ORM with compile-time SQL
  • SQLx (v0.8.6, current stable) — Asynchronous SQL toolkit (not an ORM)
  • SeaORM (v2.0, January 2026) — Async-first dynamic ORM
  • Rusqlite (v0.38.0, December 2025) — Lightweight SQLite wrapper

ETC

  • safe_c.h - Giving C superpowers - a custom header file (safe_c.h)

Features

Rust was designed with the goal of being a language suited to developing server and client programs that run on the internet. In line with this goal, Rust focuses on safety, concurrent programming, and direct control of memory management. It also aims for performance on a par with C++.

Rust's syntax resembles C and C++, using braces to delimit code blocks and keywords such as if, else, and while. However, Rust and C/C++ have semantically very different syntax.

Rust is designed not to cause memory errors. Rust enforces that null pointers and uninitialized pointers do not exist. Every variable is allocated with an initial value, and the compiler detects code that accesses freed pointers in advance and raises a compile error.

The type system, influenced by Haskell, supports type classes. Also, even if a type is not specified when declaring a variable, the compiler can determine the variable's type through type inference. On the other hand, type information cannot be omitted for function arguments and return values.

Concurrent programming uses an actor-based model similar to Erlang. Each task does not share data directly and can exchange data only through message passing. To avoid the performance loss caused by copying messages, a unique box can pass a message without copying data. A unique box can be owned by only one object, and when it is passed to another task, only the ownership changes, without copying data.

The object system consists of implementations, traits, and structs or enums. A struct or enum is used to define an object's data, and an implementation, defined with the impl keyword, is used to define an object's member functions. Object inheritance is done through traits, and to avoid C++'s polymorphic inheritance problems, traits are designed so that they cannot define object members.

How to install

Installation using rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Update to the latest version

rustup update

Basic

Shadowing

let x = 1;
let x = x + 1;

The phenomenon where the variable x is hidden (Shadowing) by a later x variable. It has the advantage of letting you reuse variable names.

The difference from let mut is that let mut "assigns" to the variable, so an error occurs if the data type changes.

let mut spaces = "   ";
spaces = spaces.len();  // Error !!!

let and const

Rust Memory Container Cheat-sheet

Rust-memory-container-cs-3840x2160-dark-back.png

for JavaScript

Rust is a fast, reliable, and memory-efficient programming language. It has been voted the most loved programming language six years in a row ( survey ). Created by Mozilla, it is now used by Facebook , Apple , Amazon , Microsoft , and Google for systems infrastructure, encryption, virtualization, and lower-level programming.

Why is Rust now being used to replace parts of the JavaScript web ecosystem, such as minification (Terser), transpilation (Babel), formatting (Prettier), bundling (webpack), and linting (ESLint)?

  • Firecracker (AWS)
  • Bottlerocket (AWS)
  • Quiche (Cloudflare)
  • Neqo (Mozilla)

for WebAssembly

WebAssembly (WASM) is a portable low-level language that Rust can compile to. It runs in the browser, is interoperable with JavaScript, and is supported in all major modern browsers.

WASM은 확실히 JS보다 훨씬 빠르지만 기본 속도는 아닙니다. 테스트에서 Parcel은 기본 바이너리보다 WASM으로 컴파일될 때 10-20배 느리게 실행됩니다. – 데본 고벳

WASM is not yet a perfect solution, but it can help developers build very fast web experiences. The Rust team is committed to a high-quality, cutting-edge WASM implementation. For developers, this means you can have the performance advantages of Rust (vs. Go) while compiling for the web (using WASM).

Some early libraries and frameworks in this space:

  • Yew
  • Percy
  • Seed
  • Sycamore
  • Stork

Rust GUIs are growing rapidly in the WASM world

Causes include the combination of Rust's cross-platform nature and WebAssembly's ease of software distribution.

  • Dioxus - Interface architecture similar to React
  • Tauri - Build desktop apps using the web, similar to Electron
  • Xilem - Data-first architecture well aligned with the Rust language architecture
  • Iced - Cross-platform GUI library focused on simplicity and type safety
  • Egui - The easiest GUI library to use
  • Kas - “efficient retained-state toolkit”
  • Slint - Targets embedded systems, microcontrollers, and desktop
  • Yew - React-like GUI framework for the web
  • Bracket - Rebranded from rltk(Roguelike Toolkit). Optimized for developing Rogukelike-style games for web/desktop
  • Vizia - Declarative & Reactive GUI framework
  • Leptos - Isomorphic web framework
  • Perseus - state-driven web development framework
  • Sauron - Versatile web framework for Client/Server web app
  • MoonZoon - Full-stack framework
  • Relm4 - idomatic GUI library inspired by Elm and GTK4-RS
  • Fltk-rs - Rust bindings for the Fast Light Toolkit
  • Makepad - UI Framework + IDE

rust + WebAssembly + Game

Debugging

rust + Ethereum

Rust projects and tools

  • pwasm-ethereum - Collection of externs to interact with ethereum-like network.
  • Ethereum WebAssembly
  • oasis_std - OASIS API reference
  • Solaris
  • SputnikVM - Rust Ethereum Virtual Machine Implementation
  • Parity - Ethereum Rust client
  • rust-web3 - Rust implementation of Web3.js library
  • Wavelet - Wavelet smart contract in Rust

Defensive coding

  • Defensive programming patterns in Rust | GeekNews
  • Introduces coding habits that actively use Rust's type system and compiler to block bugs in advance
  • Presents examples of fragile code smells (Code Smell) such as vector indexing, overuse of Default, incomplete match, and unnecessary boolean parameters, and explains alternatives
  • The core principle is to design structures so that the compiler enforces invariants, using pattern matching, private fields, the #[must_use] attribute, and more
  • Concretely presents real code-level defensive techniques such as using TryFrom, fully destructuring structs, temporary mutability, and constructor validation
  • These patterns are essential for ensuring stability during refactoring and improving long-term maintainability

Documentation

Rust cheat sheet for beginners (Cheat Sheet)
https://happygrammer.github.io/rust/cheat-seat/
https://happygrammer.github.io/rust/rust-cheat-sheet.pdf
Happygrammer.github.io_-_rust-cheat-sheet.pdf
Introduction to Rust for Python programmers
https://indosaram.github.io/rust-python-book/ch1-00.html
https://indosaram.github.io/rust-python-book/print.html
Indosaram.github.io_-_rust-python-book.pdf

See also

Favorite site

Tutorials

Guides

Embedding & FFI

Article

References


  1. The_Rust_Programming_Language.pdf ↩

  2. A-guide-to-porting-c-to-rust.pdf ↩

  3. Michael-f-bryan.github.io_-unofficial-The_Rust_FFI_Guide-_20200910.pdf ↩

  4. Rust-embedded.github.io_-_The_Embedded_Rust_Book.pdf ↩

author Zer0 sitemap