A Rust application that fetches and displays the current temperature when you press any key, then says "Peace!"
src/main.rs- The main Rust source fileCargo.toml- Rust project configuration.gitignore- Git ignore file (auto-generated)
git add .
git commit -m "Initial commit: Add Rust hello world program"- Go to https://github.com/new
- Create a new repository (e.g., "hello-world-rust")
- Don't initialize with README, .gitignore, or license
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.gitgit branch -M main
git push -u origin main- 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
cargo runThen press any key to see the temperature!
cargo build./target/debug/hello-worldcrossterm- Terminal manipulation for keyboard inputreqwest- HTTP client for API requestsserde&serde_json- JSON parsing
