Get cargo check --all working

This commit is contained in:
Jonathan Kelley committed 2024-01-18 19:27:55 -08:00
1 parent d8af9b7ed1
commit 6ed3aafb2f
34 files changed
+80 -122

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ interprocess-docfix = { version = "1.2.2" }
gitignore = "1.0.8"
[features]
default = ["plugin"]
default = []
plugin = ["mlua"]
[[bin]]
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-core"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "Core functionality for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+3 -3
View File
@@ -2,7 +2,7 @@
name = "dioxus-desktop"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "WebView renderer for Dioxus"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
@@ -83,8 +83,8 @@ dioxus = { workspace = true, features = ["launch", "desktop"]}
exitcode = "1.1.2"
[build-dependencies]
dioxus-interpreter-js = { workspace = true, features = ["binary-protocol"] }
minify-js = "0.5.6"
# dioxus-interpreter-js = { workspace = true, features = ["binary-protocol"] }
# minify-js = "0.5.6"
# These tests need to be run on the main thread, so they cannot use rust's test harness.
[[test]]
File renamed without changes.
+1 -1
View File
@@ -66,7 +66,7 @@ pub fn launch_virtual_dom(virtual_dom: VirtualDom, desktop_config: Config) {
/// Launches the WebView and runs the event loop, with configuration and root props.
pub fn launch(
root: fn() -> Element,
contexts: Vec<Box<dyn Fn() -> Box<dyn Any>>>,
contexts: Vec<Box<dyn Fn() -> Box<dyn Any> + Send + Sync>>,
platform_config: Config,
) {
let mut virtual_dom = VirtualDom::new(root);
+3 -3
View File
@@ -16,10 +16,10 @@ pub struct LaunchBuilder<Cfg = ()> {
pub type LaunchFn<Cfg> = fn(fn() -> Element, ContextList, Cfg);
#[cfg(feature = "fullstack")]
// #[cfg(feature = "fullstack")]
type ContextList = Vec<Box<dyn Fn() -> Box<dyn Any> + Send + Sync>>;
#[cfg(not(feature = "fullstack"))]
type ContextList = Vec<Box<dyn Fn() -> Box<dyn Any>>>;
// #[cfg(not(feature = "fullstack"))]
// type ContextList = Vec<Box<dyn Fn() -> Box<dyn Any>>>;
impl LaunchBuilder {
/// Create a new builder for your application. This will create a launch configuration for the current platform based on the features enabled on the `dioxus` crate.
+1 -1
View File
@@ -2,7 +2,7 @@
name = "fermi"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "Global state management for Dioxus"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+1
View File
@@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
keywords = ["ui", "gui", "react", "ssr", "fullstack"]
resolver = "2"
[dependencies]
# server functions
@@ -9,7 +9,7 @@ use dioxus_fullstack::prelude::*;
use dioxus_router::prelude::*;
fn main() {
let config = LaunchBuilder::<FullstackRouterConfig<Route>>::router();
let config = LaunchBuilder::fullstack();
#[cfg(feature = "ssr")]
config
.incremental(
@@ -19,7 +19,12 @@ fn main() {
.launch();
#[cfg(not(feature = "ssr"))]
config.launch();
config.launch(|| {
rsx! {
Router::<Route> {
}
}
});
}
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
@@ -36,9 +41,9 @@ fn Blog(id: i32) -> Element {
Link { to: Route::Home {}, "Go to counter" }
table {
tbody {
for _ in 0..*id {
for _ in 0..id {
tr {
for _ in 0..*id {
for _ in 0..id {
td { "hello world!" }
}
}
@@ -56,7 +61,7 @@ fn Home() -> Element {
rsx! {
Link {
to: Route::Blog {
id: *count.get()
id: count()
},
"Go to blog"
}
@@ -9,34 +9,25 @@ use dioxus::prelude::*;
use dioxus_fullstack::{launch, prelude::*};
use serde::{Deserialize, Serialize};
#[derive(Props, PartialEq, Debug, Default, Serialize, Deserialize, Clone)]
struct AppProps {
count: i32,
}
fn app(cx: Scope<AppProps>) -> Element {
let state =
use_server_future((), |()| async move { get_server_data().await.unwrap() })?.value();
fn app() -> Element {
let state = use_server_future(move || async move { get_server_data().await.unwrap() });
let mut count = use_signal(|| 0);
let text = use_signal(|| "...".to_string());
let mut text = use_signal(|| "...".to_string());
rsx! {
div {
"Server state: {state}"
"Server state: {state.unwrap().value().clone()}"
}
h1 { "High-Five counter: {count}" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
button {
onclick: move |_| {
to_owned![text];
async move {
if let Ok(data) = get_server_data().await {
println!("Client received: {}", data);
text.set(data.clone());
post_server_data(data).await.unwrap();
}
onclick: move |_| async move {
if let Ok(data) = get_server_data().await {
println!("Client received: {}", data);
text.set(data.clone());
post_server_data(data).await.unwrap();
}
},
"Run a server function!"
@@ -63,5 +54,5 @@ fn main() {
#[cfg(feature = "ssr")]
tracing_subscriber::fmt::init();
LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch()
LaunchBuilder::fullstack().launch(app);
}
+2 -2
View File
@@ -66,8 +66,8 @@ pub mod prelude {
}
// Warn users about overlapping features
#[cfg(all(feature = "ssr", feature = "web"))]
#[cfg(all(feature = "ssr", feature = "web", not(doc)))]
compile_error!("The `ssr` feature (enabled by `warp`, `axum`, or `salvo`) and `web` feature are overlapping. Please choose one or the other.");
#[cfg(all(feature = "ssr", feature = "desktop"))]
#[cfg(all(feature = "ssr", feature = "desktop", not(doc)))]
compile_error!("The `ssr` feature (enabled by `warp`, `axum`, or `salvo`) and `desktop` feature are overlapping. Please choose one or the other.");
+1 -1
View File
@@ -2,7 +2,7 @@
name = "generational-box"
authors = ["Evan Almloff"]
version = "0.4.3"
edition = "2018"
edition = "2021"
description = "A box backed by a generational runtime"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-hooks"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "Basic useful hooks for Dioxus."
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-html"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "HTML Element pack for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+2 -2
View File
@@ -1,7 +1,7 @@
[package]
name = "dioxus-interpreter-js"
version = { workspace = true }
edition = "2018"
edition = "2021"
authors = ["Jonathan Kelley"]
description = "JS Intepreter for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
license = "MIT OR Apache-2.0"
@@ -28,7 +28,7 @@ dioxus-html = { workspace = true, optional = true }
default = []
serialize = ["serde"]
sledgehammer = ["sledgehammer_bindgen", "sledgehammer_utils"]
web = [
webonly = [
"sledgehammer",
"wasm-bindgen",
"js-sys",
+1 -1
View File
@@ -17,7 +17,7 @@ mod write_native_mutations;
pub use write_native_mutations::*;
// Common bindings for minimal usage.
#[cfg(all(feature = "minimal_bindings", feature = "web"))]
#[cfg(all(feature = "minimal_bindings", feature = "webonly"))]
pub mod minimal_bindings {
use wasm_bindgen::{prelude::wasm_bindgen, JsValue};
#[wasm_bindgen(module = "/src/common.js")]
@@ -1,14 +1,14 @@
#[cfg(feature = "web")]
#[cfg(feature = "webonly")]
use js_sys::Function;
#[cfg(feature = "web")]
#[cfg(feature = "webonly")]
use sledgehammer_bindgen::bindgen;
#[cfg(feature = "web")]
#[cfg(feature = "webonly")]
use web_sys::Node;
#[cfg(feature = "web")]
#[cfg(feature = "webonly")]
pub const SLEDGEHAMMER_JS: &str = GENERATED_JS;
#[cfg(feature = "web")]
#[cfg(feature = "webonly")]
#[bindgen(module)]
mod js {
const JS_FILE: &str = "./src/common.js";
+3 -3
View File
@@ -58,9 +58,9 @@ rocket = "0.5.0"
rocket_ws = "0.1.0"
tower = "0.4.13"
[build-dependencies]
dioxus-interpreter-js = { workspace = true, features = ["binary-protocol"] }
minify-js = "0.5.6"
# [build-dependencies]
# dioxus-interpreter-js = { workspace = true, features = ["binary-protocol"] }
# minify-js = "0.5.6"
[features]
default = ["hot-reload"]
File renamed without changes.
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-mobile"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "Mobile-compatible renderer for Dioxus"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com/learn/0.4/getting_started/mobile"
+1 -1
View File
@@ -49,7 +49,7 @@ We're going to completely clear out the `dependencies` it generates for us, swap
name = "dioxus-ios-demo"
version = "0.1.0"
authors = ["Jonathan Kelley <jkelleyrtp@gmail.com>"]
edition = "2018"
edition = "2021"
# leave the `lib` declaration
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-router"
authors = ["Jonathan Kelley", "Evan Almloff"]
version = { workspace = true }
edition = "2018"
edition = "2021"
description = "Cross-platform router for Dioxus apps"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-rsx"
version = { workspace = true }
authors = ["Jonathan Kelley", "Evan Almloff"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Core functionality for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
repository = "https://github.com/DioxusLabs/dioxus/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-signals"
authors = ["Jonathan Kelley"]
version = "0.4.3"
edition = "2018"
edition = "2021"
description = "Signals for Dioxus"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+2 -2
View File
@@ -464,7 +464,7 @@ impl<T: 'static, S: Storage<SignalData<T>>> PartialEq for Signal<T, S> {
/// Allow calling a signal with signal() syntax
///
/// Currently only limited to copy types, though could probably specialize for string/arc/rc
impl<T: Copy, S: Storage<SignalData<T>> + 'static> Deref for Signal<T, S> {
impl<T: Clone, S: Storage<SignalData<T>> + 'static> Deref for Signal<T, S> {
type Target = dyn Fn() -> T;
fn deref(&self) -> &Self::Target {
@@ -473,7 +473,7 @@ impl<T: Copy, S: Storage<SignalData<T>> + 'static> Deref for Signal<T, S> {
// First we create a closure that captures something with the Same in memory layout as Self (MaybeUninit<Self>).
let uninit_callable = MaybeUninit::<Self>::uninit();
// Then move that value into the closure. We assume that the closure now has a in memory layout of Self.
let uninit_closure = move || *Self::read(unsafe { &*uninit_callable.as_ptr() });
let uninit_closure = move || Self::read(unsafe { &*uninit_callable.as_ptr() }).clone();
// Check that the size of the closure is the same as the size of Self in case the compiler changed the layout of the closure.
let size_of_closure = std::mem::size_of_val(&uninit_closure);
+1 -1
View File
@@ -2,7 +2,7 @@
name = "dioxus-ssr"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "Dioxus render-to-string"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
+2 -2
View File
@@ -2,7 +2,7 @@
name = "dioxus-web"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2018"
edition = "2021"
description = "Web renderer for Dioxus using websys"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
@@ -14,7 +14,7 @@ dioxus-core = { workspace = true, features = ["serialize"] }
dioxus-html = { workspace = true, features = ["wasm-bind"] }
dioxus-interpreter-js = { workspace = true, features = [
"minimal_bindings",
"web",
"webonly",
] }
js-sys = "0.3.56"
+1 -1
View File
@@ -9,7 +9,7 @@ use std::any::Any;
/// For a builder API, see `LaunchBuilder` defined in the `dioxus` crate.
pub fn launch(
root: fn() -> Element,
contexts: Vec<Box<dyn Fn() -> Box<dyn Any>>>,
contexts: Vec<Box<dyn Fn() -> Box<dyn Any> + Send + Sync>>,
platform_config: Config,
) {
let mut vdom = VirtualDom::new(root);