-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
50 lines (44 loc) · 1.49 KB
/
Copy pathCargo.toml
File metadata and controls
50 lines (44 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[package]
name = "url-shortener"
version = "0.1.0"
edition = "2021"
authors = ["Marco Arjona <m.arjona@alumnos.upm.es>"]
description = "A fast URL shortener built with Rust, Actix-web, and SQLite"
license = "MIT"
[dependencies]
# Web framework
actix-web = "4"
actix-rt = "2"
actix-governor = "0.5" # Rate limiting middleware
# Database
rusqlite = { version = "0.31", features = ["bundled"] }
r2d2 = "0.8"
r2d2_sqlite = "0.24"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Utilities
nanoid = "0.4" # For generating short IDs
chrono = { version = "0.4", features = ["serde"] }
thiserror = "1" # Error handling
env_logger = "0.11" # Logging
log = "0.4"
dotenv = "0.15" # Environment variables
validator = { version = "0.18", features = ["derive"] } # Input validation
url = "2" # URL validation
lazy_static = "1" # Lazy static initialization
regex = "1" # Regular expressions
sha2 = "0.10" # SHA-256 hashing for API keys
rand = "0.8" # Random generation for API keys
moka = { version = "0.12", features = ["sync"] } # In-memory caching
actix-web-prom = "0.9" # Prometheus metrics middleware
prometheus = "0.13" # Prometheus metrics
qrcode = "0.14" # QR code generation
image = "0.25" # Image encoding for QR codes
woothee = "0.13" # User-agent parsing
[dev-dependencies]
actix-rt = "2"
actix-http = "3"
[[bin]]
name = "url-shortener"
path = "src/main.rs"