Upgrade to axum 0.7, drop 3rd party adapters

This commit is contained in:
Jonathan Kelley committed 2024-02-15 18:05:30 -08:00
1 parent 5dd33c9dcd
commit 214a907adc
53 files changed
+643 -3260

No files matched your search

@@ -8,13 +8,11 @@ publish = false
[dependencies]
dioxus-web = { workspace = true, features = ["hydrate"], optional = true }
dioxus = { workspace = true }
dioxus = { features = ["fullstack"], workspace = true }
dioxus-fullstack = { workspace = true }
axum = { version = "0.6.12", optional = true }
axum = { workspace = true, optional = true }
tokio = { workspace = true, features = ["full"], optional = true }
serde = "1.0.159"
execute = "0.2.12"
tower-http = { version = "0.4.1", features = ["auth"], optional = true }
tower-http = { workspace = true, features = ["auth"], optional = true }
simple_logger = { version = "4.2.0", optional = true }
async-trait = { version = "0.1.71", optional = true }
sqlx = { version = "0.7.0", features = [
@@ -26,9 +24,12 @@ sqlx = { version = "0.7.0", features = [
"tls-rustls",
"runtime-tokio",
], optional = true }
http = { workspace = true, optional = true }
tower = { workspace = true, optional = true }
serde = "1.0.159"
execute = "0.2.12"
anyhow = "1.0.71"
http = { version = "0.2.9", optional = true }
tower = { version = "0.4.13", optional = true }
[dependencies.axum_session]
version = "0.3.0"
@@ -36,7 +37,7 @@ features = ["sqlite-rustls"]
optional = true
[dependencies.axum_session_auth]
version = "0.3.0"
version = "0.12.0"
features = ["sqlite-rustls"]
optional = true
@@ -17,7 +17,7 @@ use serde::{Deserialize, Serialize};
fn main() {
#[cfg(feature = "web")]
// Hydrate the application on the client
dioxus_web::launch_cfg(app, dioxus_web::Config::new().hydrate(true));
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new().hydrate(true));
#[cfg(feature = "server")]
{
@@ -51,7 +51,9 @@ fn main() {
// build our application with some routes
let app = Router::new()
// Server side render the application, serve static assets, and register server functions
.serve_dioxus_application("", ServerConfig::new(app, ()))
.serve_dioxus_application("", ServeConfig::builder().build(), || {
VirtualDom::new(app)
})
.layer(
axum_session_auth::AuthSessionLayer::<
crate::auth::User,