HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to RustVariablesData TypesOperatorsStringsVectors (Vec)Conditions (if / match)Loops (for / while)FunctionsOwnership & Borrowing
REFERENCE
📖 Overview
🖥️ Output
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Vector & HashMap
🔁 Condition & Loop
🧩 Function
🔑 Ownership & Borrowing
Rust›REFERENCE

Rust — Command Reference

Rust's most used commands — memory safety and performance combined. Each example is a complete program (fn main). Each includes an explanation and a working example.

8 categories · 22 commands

🖥️

Output

println! macro and formatting.

println!format!{:?} (debug)
3 commands →
📦

Variables

let, mut, const, and shadowing.

let / let mutconstShadowing
3 commands →
🔢

Numbers & Math

Arithmetic, methods, and type casting (as).

Arithmetic ( + - * / % )as (type casting)pow / sqrt
3 commands →
✍️

String

&str, String, and text methods.

String / &strto_uppercase / containssplit
3 commands →
📋

Vector & HashMap

Flexible lists (Vec) and key-value pairs (HashMap).

Veciter / map / sumHashMap
3 commands →
🔁

Condition & Loop

if, match, and loops.

if / elsematchfor (range)while / loop
4 commands →
🧩

Function

Function definition with fn.

fn
1 commands →
🔑

Ownership & Borrowing

Rust's signature feature: memory safety.

OwnershipBorrowing ( & )
2 commands →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code