Rob's Wiki
  • Welcome
  • AWS
    • Appsync
    • Athena
    • S3
  • Terminal
    • brew
    • curl
    • git
    • kubernetes
    • ngrok
    • terminal
    • tmux
    • zsh
  • Design
    • Sketch
    • Fusion360
    • TinkerCAD
  • Haskell
    • Haskell
    • Stack, Cabal etc
  • Javascript
    • Javascript
    • npm
    • Vue
  • CSS
  • Mac
  • Python
    • iPython
    • pip
    • Virtualenv
  • Scala
  • Rust
  • VSCode
  • Keyboard Shortcuts
Powered by GitBook
On this page
  • Installation
  • Hello World
  • Packaging etc

Rust

PreviousScalaNextVSCode

Last updated 6 years ago

Installation

Install :

brew install rustup-init
rustup-init

Install :

rustup update
rustup component add rls-preview rust-analysis rust-src

Install the

Hello World

From :

// hello.rs
fn main() {
    println!("Hello World!");
}
rustc hello.rs
./hello

Packaging etc

  • Each distributed package is called a Crate

To create a new project, then compile and run it:

cargo new rust_example
cd rust_example
cargo run

Packaging is done with

The primary Crate registry is

A simple starting guide is

to Cargo.toml

rustup
Rust Language Server
Rust Language Server VSCode extension
Rust by Example
Cargo
Crates.io
here
Add dependencies