Boyang Yan

Home

❯

posts

❯

Rust Basic Syntax

Rust Basic Syntax

Apr 04, 20251 min read

Introduction

Much of the Rust syntax will be familiar to you from C, C++ or Java:

  • Blocks and scopes are delimited by curly braces.
  • Line comments are started with /, block comments are delimited by /* … *.
  • Keywords like if and while work the same.
  • Variable assignment is done with , comparison is done with =.

Scalar Types

Compound Types

rust References

Slices

rust Functions

Reference List

  1. https://google.github.io/comprehensive-rust/basic-syntax.html

Graph View

  • Introduction
  • Scalar Types
  • Compound Types
  • rust References
  • Slices
  • rust Functions
  • Reference List

Backlinks

  • learn rust Day1

Created with Quartz v4.5.0 © 2025