Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
150 lines (126 loc) · 4.73 KB
/
Copy pathCargo.toml
File metadata and controls
150 lines (126 loc) · 4.73 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[package]
name = "torch-web"
version = "0.2.8"
edition = "2021"
authors = ["Dragos Ionut <dragosionut@keemail.me>"]
description = "🔥 Fast, secure web framework for Rust with Laravel-inspired features, built-in ORM, CLI tools, and production-ready security"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Enigmatikk/torch"
homepage = "https://github.com/Enigmatikk/torch"
documentation = "https://docs.rs/torch-web"
readme = "README.md"
keywords = ["web", "framework", "laravel", "orm", "production"]
categories = ["web-programming::http-server", "web-programming", "asynchronous", "command-line-utilities", "database"]
exclude = ["target/", ".git/", ".github/", "*.log", "test-*/", "my-*/", "examples/"]
rust-version = "1.75"
build = "build.rs"
[dependencies]
# Core async runtime and HTTP
tokio = { version = "1.0", features = ["full"] }
hyper = { version = "1.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["full"] }
http = "1.0"
http-body = "1.0"
http-body-util = "0.1"
# Utilities
futures = "0.3"
pin-project-lite = "0.2"
tower = { version = "0.4", features = ["util"] }
tower-service = "0.3"
urlencoding = "2.1"
# UUID support for path parameters
uuid = { version = "1.0", features = ["v4", "serde"], optional = true }
# Serialization (optional, for JSON support)
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
# Production features (optional)
chrono = { version = "0.4", features = ["serde"], optional = true }
toml = { version = "0.8", optional = true }
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", optional = true }
metrics = { version = "0.21", optional = true }
dashmap = { version = "5.5", optional = true }
sha2 = { version = "0.10", optional = true }
hmac = { version = "0.12", optional = true }
base64 = { version = "0.21", optional = true }
rand = { version = "0.8", optional = true }
hex = { version = "0.4", optional = true }
# WebSocket support (optional)
tokio-tungstenite = { version = "0.20", optional = true }
futures-util = { version = "0.3", optional = true }
sha1 = { version = "0.10", optional = true }
# Database support (optional) - supports PostgreSQL, MySQL/MariaDB, and SQLite
sqlx = { version = "0.8", features = ["any", "postgres", "mysql", "sqlite", "runtime-tokio-rustls", "chrono", "uuid"], optional = true }
# ORM dependencies (optional)
async-trait = { version = "0.1", optional = true }
chrono-tz = { version = "0.8", optional = true }
thiserror = { version = "1.0", optional = true }
# Security dependencies
# Cache support (optional)
redis = { version = "0.26", optional = true }
# Ember template engine dependencies (optional)
regex = { version = "1.10", optional = true }
once_cell = { version = "1.19", optional = true }
walkdir = { version = "2.4", optional = true }
# CLI dependencies (optional)
clap = { version = "4.0", features = ["derive", "color"], optional = true }
colored = { version = "2.0", optional = true }
indicatif = { version = "0.17", optional = true }
dialoguer = { version = "0.11", optional = true }
[features]
default = ["json"]
json = ["serde", "serde_json"]
full = ["production", "security", "database", "cache", "templates", "websocket", "monitoring", "api"]
production = [
"json",
"chrono",
"toml",
"uuid",
"tracing",
"tracing-subscriber",
"metrics",
"dashmap",
"sha2",
"hmac",
"base64"
]
security = ["sha2", "hmac", "base64", "uuid", "regex", "rand", "hex", "thiserror", "once_cell"]
config = ["toml", "serde"]
monitoring = ["tracing", "tracing-subscriber", "metrics", "chrono"]
websocket = ["tokio-tungstenite", "futures-util", "sha1", "base64", "uuid"]
database = ["sqlx", "chrono", "uuid", "async-trait", "once_cell", "chrono-tz", "thiserror"]
cache = ["redis"]
api = ["json", "uuid"]
templates = ["regex", "once_cell", "walkdir", "serde", "serde_json"]
cli = ["clap", "colored", "indicatif", "dialoguer", "walkdir", "toml", "serde", "serde_json", "chrono", "security"]
[[bin]]
name = "torch"
path = "src/bin/torch.rs"
required-features = ["cli"]
[dev-dependencies]
tokio-test = "0.4"
chrono = { version = "0.4", features = ["serde"] }
[[example]]
name = "hello_world"
path = "examples/hello_world.rs"
[[example]]
name = "extractors_demo"
path = "examples/extractors_demo.rs"
[[example]]
name = "state_demo"
path = "examples/state_demo.rs"
[[example]]
name = "enhanced_extractors"
path = "examples/enhanced_extractors.rs"
[[example]]
name = "ember_demo"
path = "examples/ember_demo.rs"
required-features = ["templates"]
[[example]]
name = "ember_test"
path = "examples/ember_test.rs"
required-features = ["templates"]
[[example]]
name = "registration_wizard"
path = "examples/registration_wizard.rs"
required-features = ["templates", "json"]