exchange_rates
created on: Wednesday, March 20, 2024
What it is
A command-line tool in Rust that converts amounts between different currencies using real-time exchange rate data fetched from an API.
Tech overview
- Rust - implementation language
- serde - serialization and deserialization of structs
- reqwest - http requests
- tokio - async runtime
- clap - easy cli setup
- Docker - dockerfile included for easy building and testing
- AlphaVantage - a real-time currency exchange API with a free plan
Example
Command
docker run exchange -t USD -f PLN -a 7
Result
Exchange from Polish Zloty into United States Dollar:
Exchange rate: 0.25090000,
7PLN = 1.7563USD