Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Commit

Permalink
initialise many crates
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Oct 13, 2023
1 parent d3f5873 commit 84eb1da
Show file tree
Hide file tree
Showing 25 changed files with 157 additions and 26 deletions.
59 changes: 40 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ repository = "https://github.com/oscartbeaumont/httpz"
readme = "README.md"

keywords = ["httpz", "async", "web", "http", "websockets"]
categories = ["network-programming", "web-programming", "web-programming::http-server", "asynchronous", "development-tools"]
categories = [
"network-programming",
"web-programming",
"web-programming::http-server",
"asynchronous",
"development-tools",
]

[[example]]
name = "basic"
Expand All @@ -29,7 +35,14 @@ ws = []

# Async runtimes
async-tungstenite = [] # TODO: Remove this?
tokio-ws = ["dep:async-tungstenite", "async-tungstenite/tokio-runtime", "dep:sha1", "dep:base64", "dep:tokio", "ws"] # TODO: This feature shouldn't force tokio as the async runtime
tokio-ws = [
"dep:async-tungstenite",
"async-tungstenite/tokio-runtime",
"dep:sha1",
"dep:base64",
"dep:tokio",
"ws",
] # TODO: This feature shouldn't force tokio as the async runtime
# TODO: Support other async runtimes

# Webservers
Expand All @@ -41,46 +54,54 @@ rocket = ["dep:rocket"]
warp = ["dep:warp"]
lambda = ["dep:lambda_http", "dep:tower"]
workers = ["dep:worker"]
tauri = ["dep:tauri", "dep:percent-encoding", "dep:tokio"] # TODO: Remove tokio dep once my wry & Tauri PR's are merged
tauri = [
"dep:tauri",
"dep:percent-encoding",
"dep:tokio",
] # TODO: Remove tokio dep once my wry & Tauri PR's are merged
vercel = ["dep:vercel_runtime"]

[dependencies]
# Webservers
actix-web = { version = "4.3.1", optional = true, features = [] }
axum = { version = "0.6.19", optional = true, features = [] }
poem = { version = "1.3.56", optional = true, features = [] }
actix-web = { version = "4.4.0", optional = true, features = [] }
axum = { version = "0.6.20", optional = true, features = [] }
poem = { version = "1.3.58", optional = true, features = [] }
rocket = { version = "0.5.0-rc.3", optional = true, features = [] }
warp = { version = "0.3.5", optional = true, features = [] }
warp = { version = "0.3.6", optional = true, features = [] }
lambda_http = { version = "0.8.1", optional = true, features = [] }
tower = { version = "0.4.13", optional = true, features = [] }
worker = { version = "0.0.17", optional = true, features = [] }
tauri = { version = "1.4.1", optional = true, features = ["linux-protocol-headers"] }
vercel_runtime = { version = "1.0.2", optional = true }
worker = { version = "0.0.18", optional = true, features = [] }
tauri = { version = "1.5.2", optional = true, features = [
"linux-protocol-headers",
] }
vercel_runtime = { version = "1.1.0", optional = true }

# Core
cookie = { version = "0.17.0", optional = true, features = ["percent-encode"] }
cookie = { version = "0.18.0", optional = true, features = ["percent-encode"] }
http = { version = "0.2.9", features = [] }
form_urlencoded = "1.2.0"
async-tungstenite = { version = "0.23.0", optional = true }
sha1 = { version = "0.10.5", optional = true }
base64 = { version = "0.21.2", optional = true }
tokio = { version = "1.29.1", features = [], default-features = false, optional = true }
sha1 = { version = "0.10.6", optional = true }
base64 = { version = "0.21.4", optional = true }
tokio = { version = "1.33.0", features = [
], default-features = false, optional = true }
hyper = "0.14.27" # TODO: Remove this if possible or feature gate it. I think Axum needs it.
futures = "0.3.28"
thiserror = "1.0.43"
thiserror = "1.0.49"
percent-encoding = { version = "2.3.0", optional = true, features = [] }

[dev-dependencies]
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread", "fs"] }
axum = { version = "0.6.19", features = [] }
tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread", "fs"] }
axum = { version = "0.6.20", features = [] }
tower = { version = "0.4.13", features = [] }
hyper = { version = "0.14.27", features = [] }
actix-web = "4.3.1"
actix-web = "4.4.0"

[workspace]
members = [
"./crates/*",
"./examples/cf-workers",
"./examples/netlify/netlify/functions/demo",
"./examples/tauri",
"./examples/vercel"
"./examples/vercel",
]
8 changes: 8 additions & 0 deletions crates/actix-web/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "actix-web"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/actix-web/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/axum/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "axum"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/axum/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/cf-workers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "cf-workers"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/cf-workers/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/hyper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "hyper"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/hyper/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/lambda/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "lambda"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/lambda/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/poem/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "poem"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/poem/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/rocket/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "rocket"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/rocket/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "tauri"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/vercel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "vercel"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/vercel/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
8 changes: 8 additions & 0 deletions crates/warp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "warp"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
3 changes: 3 additions & 0 deletions crates/warp/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
4 changes: 2 additions & 2 deletions examples/cf-workers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ default = ["console_error_panic_hook"]
[dependencies]
httpz = { path = "../../", features = ["workers"] }
cfg-if = "1.0.0"
worker = "0.0.17"
serde_json = "1.0.103"
worker = "0.0.18"
serde_json = "1.0.107"

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
Expand Down
2 changes: 1 addition & 1 deletion examples/netlify/netlify/functions/demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dependencies]
httpz = { path = "../../../../../", features = ["lambda"] }
tokio = "1.29.1"
tokio = "1.33.0"
lambda_http = "0.8.1"
tracing-subscriber = "0.3.17"
tracing = "0.1.37"
4 changes: 2 additions & 2 deletions examples/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ rust-version = "1.57"
publish = false

[build-dependencies]
tauri-build = { version = "1.4", features = [] }
tauri-build = { version = "1.5", features = [] }

[dependencies]
httpz = { path = "../../", features = ["tauri"] }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.4", features = ["linux-protocol-headers", "shell-open"] } # "linux-protocol-headers" is highly reccomended for usage with httpz
tauri = { version = "1.5", features = ["linux-protocol-headers", "shell-open"] } # "linux-protocol-headers" is highly reccomended for usage with httpz

[features]
# by default Tauri runs in production mode
Expand Down
4 changes: 2 additions & 2 deletions examples/vercel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
tokio = { version = "1", features = ["macros"] }
serde_json = { version = "1.0.103", features = ["raw_value"] }
serde_json = { version = "1.0.107", features = ["raw_value"] }
httpz = { path = "../..", features = ["vercel"] }
vercel_runtime = { version = "1.0.2" }
vercel_runtime = { version = "1.1.0" }

[[bin]]
name = "simple"
Expand Down

0 comments on commit 84eb1da

Please sign in to comment.