https://github.com/th-blitz/learning-rust
Getting Rusty with rust tutorials. Following the documentation called " Rust by example " created by the rust community. This repository is for my reference to learn an make notes on the fundamentals of the rust language.
https://github.com/th-blitz/learning-rust
docker rust rust-cheat rust-crate rust-language
Last synced: 3 days ago
JSON representation
Getting Rusty with rust tutorials. Following the documentation called " Rust by example " created by the rust community. This repository is for my reference to learn an make notes on the fundamentals of the rust language.
- Host: GitHub
- URL: https://github.com/th-blitz/learning-rust
- Owner: th-blitz
- License: mit
- Created: 2022-08-07T15:56:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-26T09:09:37.000Z (almost 3 years ago)
- Last Synced: 2025-03-13T05:41:19.350Z (11 months ago)
- Topics: docker, rust, rust-cheat, rust-crate, rust-language
- Language: Rust
- Homepage:
- Size: 1.06 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Learning-Rust
### Learning Rust by example.
- Learning ``` fundamentals ``` and ``` basics ``` of Rust by referring to the documentation " ``` Rust by example ``` "
maintained by the rust community @ https://www.rust-lang.org/learn.
- This repository is a collection of ``` Rust ``` code snippets, templates & tests implemented from the doc ``` Rust by Example ```.
- Documentaion link : https://doc.rust-lang.org/rust-by-example.
# Rust docker image setup
### 1. **Build the docker image 'rust' from the docker file rust.Dockerfile.**
```sh
docker build -t rust -f Envs/rust.Dockerfile Envs
```
*```Building the image may take 5 to 15 mins. This is done only for the first time.```*
### 2. **Run a container called rust from the built image.**
*``` For windows cmd ```*
```sh
docker run --rm -d -t --name=rust -v %cd%:/home/mount rust
```
*```For Mac terminal OR windows powershell```*
```sh
docker run --rm -d -t --name=rust -v ${PWD}:/home/mount rust
```
*``` For linux terminal ```*
```sh
docker run --rm -d -t --name=rust -v $(pwd):/home/mount rust
```
### 3. **Open a interactive terminal from the running rust container.**
```sh
docker exec -ti rust bash
```
### 4. **Run any files from within the shell.**
```sh
ls
cd Arrays
cd two_sum
node two_sum.js
```
### 5. **To stop and remove the running container.**
```sh
docker stop rust
```