https://github.com/nattatorn-dev/rust-demo
rust language fundamental
https://github.com/nattatorn-dev/rust-demo
fundamental rust unittest
Last synced: about 2 months ago
JSON representation
rust language fundamental
- Host: GitHub
- URL: https://github.com/nattatorn-dev/rust-demo
- Owner: nattatorn-dev
- Created: 2021-04-16T09:05:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-04T18:03:39.000Z (about 4 years ago)
- Last Synced: 2025-03-29T05:38:08.107Z (about 2 months ago)
- Topics: fundamental, rust, unittest
- Language: Rust
- Homepage:
- Size: 185 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust
Fundermental rust and unit test.
## Install Rust
```bash
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
```## Initial
```bash
$ cargo init demo-rust
```## Build (creates binary in target/)
```bash
$ cargo build
```## Run
```bash
$ cargo run --example array
$ cargo run --example conditional
$ cargo run --example controlflow
$ cargo run --example enum
$ cargo run --example number
$ cargo run --example string
$ cargo run --example struct
$ cargo run --example trait
$ cargo run --example tuple
$ cargo run --example vector
```## Test
```bash
$ cargo test --example array
```## Code Formatting
```bash
$ cargo fmt
```