add a third party feature for freya
This commit is contained in:
1 parent
f42bc61288
commit
5f8d0f6c40
3 files changed
+9
No files matched your search
@@ -54,6 +54,8 @@ salvo = ["dioxus-fullstack?/salvo", "ssr", "dioxus-liveview?/salvo"]
|
|||||||
warp = ["dioxus-fullstack?/warp", "ssr", "dioxus-liveview?/warp"]
|
warp = ["dioxus-fullstack?/warp", "ssr", "dioxus-liveview?/warp"]
|
||||||
rocket = ["dioxus-liveview?/rocket"]
|
rocket = ["dioxus-liveview?/rocket"]
|
||||||
tui = ["dioxus-tui", "dioxus-config-macro/tui"]
|
tui = ["dioxus-tui", "dioxus-config-macro/tui"]
|
||||||
|
# This feature just disables the no-renderer-enabled warning
|
||||||
|
third-party-renderer = []
|
||||||
|
|
||||||
# This feature enables some nightly flags that make it more clear what structs/methods are available in each feature
|
# This feature enables some nightly flags that make it more clear what structs/methods are available in each feature
|
||||||
nightly-doc = []
|
nightly-doc = []
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
// Warn the user if they enabled the launch feature without any renderers
|
// Warn the user if they enabled the launch feature without any renderers
|
||||||
if feature_enabled("launch") {
|
if feature_enabled("launch") {
|
||||||
|
if feature_enabled("third-party-renderer"){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let liveview_renderers = [
|
let liveview_renderers = [
|
||||||
"liveview",
|
"liveview",
|
||||||
"axum",
|
"axum",
|
||||||
|
|||||||
@@ -211,6 +211,9 @@ mod current_platform {
|
|||||||
contexts: Vec<Box<super::ValidContext>>,
|
contexts: Vec<Box<super::ValidContext>>,
|
||||||
platform_config: (),
|
platform_config: (),
|
||||||
) {
|
) {
|
||||||
|
#[cfg(feature = "third-party-renderer")]
|
||||||
|
panic!("No first party renderer feature enabled. It looks like you are trying to use a third party renderer. You will need to use the launch function from the third party renderer crate.");
|
||||||
|
|
||||||
panic!("No platform feature enabled. Please enable one of the following features: liveview, desktop, mobile, web, tui, fullstack to use the launch API.");
|
panic!("No platform feature enabled. Please enable one of the following features: liveview, desktop, mobile, web, tui, fullstack to use the launch API.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user