Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hacke2/rust-hello-world
https://github.com/hacke2/rust-hello-world
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hacke2/rust-hello-world
- Owner: hacke2
- Created: 2021-12-17T10:42:14.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-17T10:43:03.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T04:14:20.865Z (about 1 month ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Hello World in Mozilla's Rust language
This is trivial Hello World example written in Mozilla's Rust language.
This example comes from https://doc.rust-lang.org/book/getting-started.html## Setup
Tested on `Ubuntu 18.04.2 LTS` (formerly Ubuntu 16.04.1 LTS)
Install these packages on Ubuntu:
```bash
sudo apt-get install git rustc cargo
```
Clone this project using:```bash
mkdir ~/projects
cd ~/projects
git clone https://github.com/hpaluch/rust-hello-world.git
cd rust-hello-world
```Updating from Ubuntu 16 to Ubuntu 18:
Issue this command to update to recent dependencies:
```bash
cargo update
```## Build
Invoke for this project directory:
```bash
cargo build
```## Run
Invoke this command from project directory:
```bash
cargo run
```## Examples
### Date example
Printing current date/time:
* `chrono` depndency was added to `Cargo.toml`
from https://docs.rs/chrono/0.4.6/chrono/
* and example snippet was copied
from https://rust-lang-nursery.github.io/rust-cookbook/datetime/parse.html#display-formatted-date-and-timeThese two files were modified:
* [Cargo.toml](https://github.com/hpaluch/rust-hello-world/commit/3d4b250b81c6b2f7e0d2f5d0267f50e850acca6f#diff-80398c5faae3c069e4e6aa2ed11b28c0)
* [main.rs](https://github.com/hpaluch/rust-hello-world/commit/3d4b250b81c6b2f7e0d2f5d0267f50e850acca6f#diff-639fbc4ef05b315af92b4d836c31b023)### Original hello-world
Can be still fetched using this tag: https://github.com/hpaluch/rust-hello-world/tree/t-just-hello-world
### Resources
* https://doc.rust-lang.org/book/getting-started.html
* https://www.rust-lang.org/en-US/ About Mozilla's Rust language
* https://www.wired.com/2016/03/epic-story-dropboxs-exodus-amazon-cloud-empire/ DropBox using Rust