diff --git a/tutorial/server/axum/Cargo.toml b/tutorial/server/axum/Cargo.toml index 78fd166c..8880ebab 100644 --- a/tutorial/server/axum/Cargo.toml +++ b/tutorial/server/axum/Cargo.toml @@ -2,7 +2,9 @@ name = "axum_tutorial" version = "0.1.0" edition = "2021" -authors = ["William Brown , Ben Wishovich "] +authors = [ + "William Brown , Ben Wishovich ", +] license = "MPL-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -11,7 +13,9 @@ license = "MPL-2.0" tracing.workspace = true tracing-subscriber.workspace = true serde.workspace = true -webauthn-rs = { workspace = true, features = ["danger-allow-state-serialisation"] } +webauthn-rs = { workspace = true, features = [ + "danger-allow-state-serialisation", +] } axum = { version = "0.7" } tokio = { workspace = true, features = ["full"] } uuid = { workspace = true, features = ["v4"] } @@ -22,6 +26,6 @@ tower-http = { version = "0.6", features = ["fs"] } tower-sessions = "0.13" [features] -default = ["wasm"] +default = ["javascript"] wasm = [] javascript = [] diff --git a/tutorial/server/axum/src/main.rs b/tutorial/server/axum/src/main.rs index c77f44e3..5095bcbe 100644 --- a/tutorial/server/axum/src/main.rs +++ b/tutorial/server/axum/src/main.rs @@ -1,5 +1,7 @@ use axum::{extract::Extension, http::StatusCode, response::IntoResponse, routing::post, Router}; -use std::{net::SocketAddr, path::PathBuf}; +use std::net::SocketAddr; +#[cfg(feature = "wasm")] +use std::path::PathBuf; use tower_sessions::{ cookie::{time::Duration, SameSite}, Expiry, MemoryStore, SessionManagerLayer,