mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
Re-export the axum feature flag under "server" (#2786)
* re-export the axum feature flag under "server" * remove the axum prefix from all the fullstack examples
This commit is contained in:
parent
37ea8ab906
commit
eeccb741d3
24 changed files with 269 additions and 283 deletions
513
Cargo.lock
generated
513
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -33,11 +33,11 @@ members = [
|
||||||
"packages/lazy-js-bundle",
|
"packages/lazy-js-bundle",
|
||||||
|
|
||||||
# Fullstack examples
|
# Fullstack examples
|
||||||
"packages/fullstack/examples/axum-hello-world",
|
"packages/fullstack/examples/hello-world",
|
||||||
"packages/fullstack/examples/axum-router",
|
"packages/fullstack/examples/router",
|
||||||
"packages/fullstack/examples/axum-streaming",
|
"packages/fullstack/examples/streaming",
|
||||||
"packages/fullstack/examples/axum-desktop",
|
"packages/fullstack/examples/desktop",
|
||||||
"packages/fullstack/examples/axum-auth",
|
"packages/fullstack/examples/auth",
|
||||||
"packages/fullstack/examples/hackernews",
|
"packages/fullstack/examples/hackernews",
|
||||||
|
|
||||||
# Static generation examples
|
# Static generation examples
|
||||||
|
|
|
@ -57,7 +57,8 @@ web = ["dep:dioxus-web", "dioxus-fullstack?/web", "dioxus-static-site-generation
|
||||||
ssr = ["dep:dioxus-ssr", "dioxus-router?/ssr", "dioxus-config-macro/ssr"]
|
ssr = ["dep:dioxus-ssr", "dioxus-router?/ssr", "dioxus-config-macro/ssr"]
|
||||||
liveview = ["dep:dioxus-liveview", "dioxus-config-macro/liveview", "dioxus-router?/liveview"]
|
liveview = ["dep:dioxus-liveview", "dioxus-config-macro/liveview", "dioxus-router?/liveview"]
|
||||||
static-generation = ["dep:dioxus-static-site-generation", "dioxus-config-macro/static-generation"]
|
static-generation = ["dep:dioxus-static-site-generation", "dioxus-config-macro/static-generation"]
|
||||||
axum = ["dioxus-fullstack?/axum", "dioxus-fullstack?/server", "dioxus-static-site-generation?/server", "ssr", "dioxus-liveview?/axum", "dep:axum"]
|
axum = ["server"]
|
||||||
|
server = ["dioxus-fullstack?/axum", "dioxus-fullstack?/server", "dioxus-static-site-generation?/server", "ssr", "dioxus-liveview?/axum", "dep:axum"]
|
||||||
|
|
||||||
# This feature just disables the no-renderer-enabled warning
|
# This feature just disables the no-renderer-enabled warning
|
||||||
third-party-renderer = []
|
third-party-renderer = []
|
||||||
|
@ -88,5 +89,5 @@ features = [
|
||||||
"html",
|
"html",
|
||||||
"liveview",
|
"liveview",
|
||||||
"static-generation",
|
"static-generation",
|
||||||
"axum"
|
"server"
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,8 +5,8 @@ fn main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let liveview_renderers = ["liveview", "axum"];
|
let liveview_renderers = ["liveview", "server"];
|
||||||
let fullstack_renderers = ["axum"];
|
let fullstack_renderers = ["server"];
|
||||||
let client_renderers = ["desktop", "mobile", "web"];
|
let client_renderers = ["desktop", "mobile", "web"];
|
||||||
let client_renderer_selected = client_renderers
|
let client_renderer_selected = client_renderers
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -33,6 +33,10 @@ fn main() {
|
||||||
println!("cargo:warning=You have enabled the launch feature, but have not enabled any client renderers. The application will not be able to launch. Try enabling one of the following renderers: {}, fullstack or liveview", client_renderers.join(", "));
|
println!("cargo:warning=You have enabled the launch feature, but have not enabled any client renderers. The application will not be able to launch. Try enabling one of the following renderers: {}, fullstack or liveview", client_renderers.join(", "));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if feature_enabled("axum") {
|
||||||
|
println!("cargo:warning=The axum feature has been renamed to server and will be removed in a future release. Please update your code to use server feature instead.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn feature_enabled(feature: &str) -> bool {
|
fn feature_enabled(feature: &str) -> bool {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "axum-auth"
|
name = "fullstack-auth-example"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "axum-desktop"
|
name = "fullstack-desktop-example"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
|
@ -3,7 +3,7 @@
|
||||||
// cargo run --bin client --features desktop
|
// cargo run --bin client --features desktop
|
||||||
// ```
|
// ```
|
||||||
|
|
||||||
use axum_desktop::*;
|
use fullstack_desktop_example::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Set the url of the server where server functions are hosted.
|
// Set the url of the server where server functions are hosted.
|
|
@ -3,8 +3,8 @@
|
||||||
// cargo run --bin server --features server
|
// cargo run --bin server --features server
|
||||||
// ```
|
// ```
|
||||||
|
|
||||||
use axum_desktop::*;
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
use fullstack_desktop_example::*;
|
||||||
use server_fn::axum::register_explicit;
|
use server_fn::axum::register_explicit;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dioxus-hackernews"
|
name = "fullstack-hackernews-example"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Evan Almloff <evanalmloff@gmail.com>"]
|
authors = ["Evan Almloff <evanalmloff@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "axum-hello-world"
|
name = "fullstack-hello-world-example"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "axum-router"
|
name = "fullstack-router-example"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "axum-streaming"
|
name = "fullstack-streaming-example"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
Loading…
Reference in a new issue