https://github.com/gcp-development/basic-rust
Simple Basic Rust Examples
https://github.com/gcp-development/basic-rust
rust
Last synced: about 1 year ago
JSON representation
Simple Basic Rust Examples
- Host: GitHub
- URL: https://github.com/gcp-development/basic-rust
- Owner: gcp-development
- Created: 2022-11-03T14:58:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T08:19:57.000Z (over 3 years ago)
- Last Synced: 2025-01-31T12:48:58.543Z (over 1 year ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# basic-rust
Simple Basic Rust Examples
It's assumed that Rust is [configured and running](https://doc.rust-lang.org/cargo/getting-started/installation.html).
Compile and execute unit, integration, and documentation [tests](https://doc.rust-lang.org/cargo/commands/cargo-test.html).
```bash
cargo test
```
Build the [documentation](https://doc.rust-lang.org/cargo/commands/cargo-doc.html) for the local package and all dependencies. The output is placed in target/doc.
```bash
cargo doc
```
[Compile](https://doc.rust-lang.org/cargo/commands/cargo-build.html) local packages and all of their dependencies.
```bash
cargo build
```
Execute the compiled code.
```bash
./target/debug/basic-rust --dev
```
[Remove](https://doc.rust-lang.org/cargo/commands/cargo-clean.html) artifacts from the target directory that Cargo has generated in the past.
```bash
cargo clean
```
References:
[The Cargo Book](https://doc.rust-lang.org/cargo/index.html)
[The Rust Programming Language](https://doc.rust-lang.org/book/title-page.html)
[rustlings](https://github.com/rust-lang/rustlings/)