diff --git a/Cargo.toml b/Cargo.toml index e1dfb26..3ead60b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" @@ -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 @@ -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", ] diff --git a/crates/actix-web/Cargo.toml b/crates/actix-web/Cargo.toml new file mode 100644 index 0000000..8fa1551 --- /dev/null +++ b/crates/actix-web/Cargo.toml @@ -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] diff --git a/crates/actix-web/src/main.rs b/crates/actix-web/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/actix-web/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/axum/Cargo.toml b/crates/axum/Cargo.toml new file mode 100644 index 0000000..290b32b --- /dev/null +++ b/crates/axum/Cargo.toml @@ -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] diff --git a/crates/axum/src/main.rs b/crates/axum/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/axum/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/cf-workers/Cargo.toml b/crates/cf-workers/Cargo.toml new file mode 100644 index 0000000..ee7a6f8 --- /dev/null +++ b/crates/cf-workers/Cargo.toml @@ -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] diff --git a/crates/cf-workers/src/main.rs b/crates/cf-workers/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/cf-workers/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/hyper/Cargo.toml b/crates/hyper/Cargo.toml new file mode 100644 index 0000000..b10c4bc --- /dev/null +++ b/crates/hyper/Cargo.toml @@ -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] diff --git a/crates/hyper/src/main.rs b/crates/hyper/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/hyper/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/lambda/Cargo.toml b/crates/lambda/Cargo.toml new file mode 100644 index 0000000..108e5c1 --- /dev/null +++ b/crates/lambda/Cargo.toml @@ -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] diff --git a/crates/lambda/src/main.rs b/crates/lambda/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/lambda/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/poem/Cargo.toml b/crates/poem/Cargo.toml new file mode 100644 index 0000000..4707e0b --- /dev/null +++ b/crates/poem/Cargo.toml @@ -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] diff --git a/crates/poem/src/main.rs b/crates/poem/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/poem/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/rocket/Cargo.toml b/crates/rocket/Cargo.toml new file mode 100644 index 0000000..ee84bb2 --- /dev/null +++ b/crates/rocket/Cargo.toml @@ -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] diff --git a/crates/rocket/src/main.rs b/crates/rocket/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/rocket/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml new file mode 100644 index 0000000..82f4fee --- /dev/null +++ b/crates/tauri/Cargo.toml @@ -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] diff --git a/crates/tauri/src/main.rs b/crates/tauri/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/tauri/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/vercel/Cargo.toml b/crates/vercel/Cargo.toml new file mode 100644 index 0000000..a69d744 --- /dev/null +++ b/crates/vercel/Cargo.toml @@ -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] diff --git a/crates/vercel/src/main.rs b/crates/vercel/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/vercel/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/warp/Cargo.toml b/crates/warp/Cargo.toml new file mode 100644 index 0000000..82a734f --- /dev/null +++ b/crates/warp/Cargo.toml @@ -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] diff --git a/crates/warp/src/main.rs b/crates/warp/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/warp/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/examples/cf-workers/Cargo.toml b/examples/cf-workers/Cargo.toml index b3595e5..1030c1b 100644 --- a/examples/cf-workers/Cargo.toml +++ b/examples/cf-workers/Cargo.toml @@ -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 diff --git a/examples/netlify/netlify/functions/demo/Cargo.toml b/examples/netlify/netlify/functions/demo/Cargo.toml index 93eb816..303a027 100644 --- a/examples/netlify/netlify/functions/demo/Cargo.toml +++ b/examples/netlify/netlify/functions/demo/Cargo.toml @@ -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" diff --git a/examples/tauri/Cargo.toml b/examples/tauri/Cargo.toml index cca0687..66aac66 100644 --- a/examples/tauri/Cargo.toml +++ b/examples/tauri/Cargo.toml @@ -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 diff --git a/examples/vercel/Cargo.toml b/examples/vercel/Cargo.toml index 80ee32e..a2d91ce 100644 --- a/examples/vercel/Cargo.toml +++ b/examples/vercel/Cargo.toml @@ -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"