GitHub - elliyeen/test · GitHub
Skip to content

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

GitHub Demo - Temperature App (Rust)

A Rust application that fetches and displays the current temperature when you press any key, then says "Peace!"

Project Structure

  • src/main.rs - The main Rust source file
  • Cargo.toml - Rust project configuration
  • .gitignore - Git ignore file (auto-generated)

How to Push to GitHub

1. Add Files and Create Initial Commit

git add .
git commit -m "Initial commit: Add Rust hello world program"

2. Create a New Repository on GitHub

  • Go to https://github.com/new
  • Create a new repository (e.g., "hello-world-rust")
  • Don't initialize with README, .gitignore, or license

3. Add Remote Repository

git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git

4. Push to GitHub

git branch -M main
git push -u origin main

Features

  • Waits for any key press
  • Fetches current temperature from wttr.in API
  • Displays temperature in both Fahrenheit and Celsius
  • Says "Peace!" after showing the temperature
  • Press 'q' to quit the application

Running the Program

Build and run:

cargo run

Then press any key to see the temperature!

Build only:

cargo build

Run the compiled binary:

./target/debug/hello-world

Dependencies

  • crossterm - Terminal manipulation for keyboard input
  • reqwest - HTTP client for API requests
  • serde & serde_json - JSON parsing

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages