Pre-release 0.6.0-alpha.0 (#2755)
* CI: add docsrs to ci * add env vars * no need for tokio things * whoops, wrong rust nightly * add swc * bump crate versions to 0.6.0-alpha.0 * hoist up warnings and shuffle cargo.toml * update cargos and disable warnings from ci * attempt fix of aws * attempt disabling aws_lc_sys globally * pull in lc-sys * add fips feature to fix docs * turn on features for aws-lc-sys on cargo-doc-all * pass along more args * fix cfg docs * fix: flakey gen box test * fix: doc_cfg in static gen * dont include readme * fix error on static gen * remove random line * temporarily disable warnings * simplify axum desktop so it doesnt count as a lib * fix binstall link * bump locks * lock fixes * revert axum desktop * dont publish some crates
This commit is contained in:
1 parent
4ffcef16af
commit
0cbcef735f
22 files changed
+1927
-435
No files matched your search
@@ -1,7 +1,6 @@
|
||||
[package]
|
||||
name = "dioxus-cli"
|
||||
version = "0.5.2"
|
||||
# version = { workspace = true }
|
||||
version = { workspace = true }
|
||||
authors = ["Jonathan Kelley"]
|
||||
edition = "2021"
|
||||
description = "CLI tool for developing, testing, and publishing Dioxus apps"
|
||||
@@ -39,7 +38,7 @@ anyhow = "1"
|
||||
hyper = { workspace = true }
|
||||
hyper-util = "0.1.3"
|
||||
hyper-rustls = { workspace = true }
|
||||
rustls = {version="0.23.11", default-features=false, features =["logging","std","tls12","ring"]}
|
||||
rustls = { workspace = true }
|
||||
subprocess = "0.2.9"
|
||||
rayon = "1.8.0"
|
||||
console = "0.15.8"
|
||||
@@ -130,7 +129,10 @@ tempfile = "3.3"
|
||||
|
||||
[package.metadata.binstall]
|
||||
# temporarily, we're going to use the 0.5.0 download page for all binaries
|
||||
pkg-url = "{ repo }/releases/download/v0.5.0/dx-{ target }-v{ version }{ archive-suffix }"
|
||||
pkg-url = "{ repo }/releases/download/v{ version }/dx-{ target }-v{ version }{ archive-suffix }"
|
||||
|
||||
# the old one...
|
||||
# pkg-url = "{ repo }/releases/download/v0.5.0/dx-{ target }-v{ version }{ archive-suffix }"
|
||||
|
||||
# pkg-url = "{ repo }/releases/download/v{ version }/dx-{ target }{ archive-suffix }"
|
||||
pkg-fmt = "tgz"
|
||||
|
||||
@@ -24,7 +24,7 @@ serde = { version = "1", features = ["derive"], optional = true }
|
||||
generational-box = { workspace = true }
|
||||
rustversion = "1.0.17"
|
||||
const_format = { workspace = true }
|
||||
warnings = { git = "https://github.com/DioxusLabs/warnings" }
|
||||
warnings = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true, features = ["full"] }
|
||||
|
||||
@@ -90,16 +90,26 @@ hot-reload = ["dep:dioxus-hot-reload", "dioxus-signals"]
|
||||
gnu = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
default-features = false
|
||||
features = ["tokio_runtime", "hot-reload"]
|
||||
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||
default-features = false
|
||||
targets = [
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-pc-windows-msvc",
|
||||
"aarch64-apple-darwin",
|
||||
"aarch64-apple-ios",
|
||||
"aarch64-linux-android",
|
||||
"armv7-linux-androideabi",
|
||||
]
|
||||
rustc-args = [ "--cfg", "docsrs" ]
|
||||
rustdoc-args = [ "--cfg", "docsrs" ]
|
||||
|
||||
[dev-dependencies]
|
||||
dioxus = { workspace = true, features = ["desktop"] }
|
||||
exitcode = "1.1.2"
|
||||
reqwest = { workspace = true, features = ["json"] }
|
||||
http-range = { version = "0.1.5" }
|
||||
dioxus-ssr = { workspace = true, version = "0.5.0", default-features = false }
|
||||
dioxus-ssr = { workspace = true, default-features = false }
|
||||
separator = "0.4.1"
|
||||
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
|
||||
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
|
||||
#![deny(missing_docs)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
mod app;
|
||||
mod assets;
|
||||
|
||||
@@ -66,7 +66,7 @@ third-party-renderer = []
|
||||
futures-util = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||
criterion = "0.3.5"
|
||||
criterion = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
env_logger = "0.10.0"
|
||||
tokio = { workspace = true, features = ["full"] }
|
||||
|
||||
@@ -49,6 +49,8 @@ futures-util = { workspace = true }
|
||||
futures-channel = { workspace = true }
|
||||
ciborium = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
rustls = { workspace = true, optional = true }
|
||||
hyper-rustls = { workspace = true, optional = true }
|
||||
|
||||
pin-project = { version = "1.1.2", optional = true }
|
||||
thiserror = { workspace = true, optional = true }
|
||||
@@ -61,6 +63,8 @@ web-sys = { version = "0.3.61", optional = true, features = ["Window", "Document
|
||||
dioxus-cli-config = { workspace = true, features = ["read-config"], optional = true }
|
||||
clap = { version = "4.5.7", optional = true, features = ["derive"] }
|
||||
|
||||
aws-lc-rs = { version = "1.8.1", optional = true }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
tokio = { workspace = true, features = ["rt", "sync"], optional = true }
|
||||
|
||||
@@ -82,7 +86,7 @@ web = ["dep:dioxus-web", "dep:web-sys"]
|
||||
desktop = ["dep:dioxus-desktop", "server_fn/reqwest", "dioxus_server_macro/reqwest"]
|
||||
mobile = ["dep:dioxus-mobile"]
|
||||
default-tls = ["server_fn/default-tls"]
|
||||
rustls = ["server_fn/rustls"]
|
||||
rustls = ["server_fn/rustls", "dep:rustls", "dep:hyper-rustls"]
|
||||
axum = ["dep:axum", "dep:tower-http", "server", "server_fn/axum", "dioxus_server_macro/axum", "default-tls"]
|
||||
server = [
|
||||
"server_fn/ssr",
|
||||
@@ -109,4 +113,4 @@ server = [
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||
features = ["axum", "web"]
|
||||
features = ["axum", "web", "dep:aws-lc-rs"]
|
||||
@@ -21,7 +21,7 @@ sqlx = { version = "0.7.0", features = [
|
||||
"postgres",
|
||||
"sqlite",
|
||||
"_unstable-all-types",
|
||||
"tls-rustls",
|
||||
"tls-native-tls",
|
||||
"runtime-tokio",
|
||||
], optional = true }
|
||||
http = { workspace = true, optional = true }
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#![allow(non_snake_case)]
|
||||
use dioxus::prelude::*;
|
||||
|
||||
/// Run with `cargo run --features desktop`
|
||||
#[cfg(feature = "desktop")]
|
||||
fn main() {
|
||||
// Set the url of the server where server functions are hosted.
|
||||
dioxus::fullstack::prelude::server_fn::client::set_server_url("http://127.0.0.1:8080");
|
||||
|
||||
// And then launch the app
|
||||
dioxus::prelude::launch_desktop(app);
|
||||
}
|
||||
|
||||
/// Run with `cargo run --features server`
|
||||
#[cfg(all(feature = "server", not(feature = "desktop")))]
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
use server_fn::axum::register_explicit;
|
||||
|
||||
let listener = tokio::net::TcpListener::bind("127.0.0.01:8080")
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
register_explicit::<PostServerData>();
|
||||
register_explicit::<GetServerData>();
|
||||
|
||||
axum::serve(
|
||||
listener,
|
||||
axum::Router::new()
|
||||
.register_server_functions()
|
||||
.into_make_service(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
pub fn app() -> Element {
|
||||
let mut count = use_signal(|| 0);
|
||||
let mut text = use_signal(|| "...".to_string());
|
||||
|
||||
rsx! {
|
||||
h1 { "High-Five counter: {count}" }
|
||||
button { onclick: move |_| count += 1, "Up high!" }
|
||||
button { onclick: move |_| count -= 1, "Down low!" }
|
||||
button {
|
||||
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"
|
||||
}
|
||||
"Server said: {text}"
|
||||
}
|
||||
}
|
||||
|
||||
#[server(PostServerData)]
|
||||
async fn post_server_data(data: String) -> Result<(), ServerFnError> {
|
||||
println!("Server received: {}", data);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[server(GetServerData)]
|
||||
async fn get_server_data() -> Result<String, ServerFnError> {
|
||||
Ok("Hello from the server!".to_string())
|
||||
}
|
||||
@@ -3,6 +3,7 @@ name = "dioxus-hackernews"
|
||||
version = "0.1.0"
|
||||
authors = ["Evan Almloff <evanalmloff@gmail.com>"]
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ parking_lot = "0.12.1"
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.8.5"
|
||||
criterion = "0.3"
|
||||
criterion = { workspace = true }
|
||||
|
||||
[features]
|
||||
debug_borrows = []
|
||||
|
||||
@@ -12,27 +12,6 @@ use generational_box::{GenerationalBox, Storage, SyncStorage, UnsyncStorage};
|
||||
#[allow(unused)]
|
||||
fn compile_fail() {}
|
||||
|
||||
#[test]
|
||||
fn reused() {
|
||||
fn reused_test<S: Storage<i32>>() {
|
||||
let first_ptr;
|
||||
{
|
||||
let owner = S::owner();
|
||||
first_ptr = owner.insert(1).raw_ptr();
|
||||
drop(owner);
|
||||
}
|
||||
{
|
||||
let owner = S::owner();
|
||||
let second_ptr = owner.insert(1234).raw_ptr();
|
||||
assert_eq!(first_ptr, second_ptr);
|
||||
drop(owner);
|
||||
}
|
||||
}
|
||||
|
||||
reused_test::<UnsyncStorage>();
|
||||
reused_test::<SyncStorage>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn leaking_is_ok() {
|
||||
fn leaking_is_ok_test<S: Storage<String>>() {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//! This test needs to be in its own file such that it doesn't share
|
||||
//! an address space with the other tests.
|
||||
//!
|
||||
//! That will cause random failures on CI.
|
||||
|
||||
use generational_box::{Storage, SyncStorage, UnsyncStorage};
|
||||
|
||||
#[test]
|
||||
fn reused() {
|
||||
fn reused_test<S: Storage<i32>>() {
|
||||
let first_ptr;
|
||||
{
|
||||
let owner = S::owner();
|
||||
first_ptr = owner.insert(1).raw_ptr();
|
||||
drop(owner);
|
||||
}
|
||||
{
|
||||
let owner = S::owner();
|
||||
let second_ptr = owner.insert(1234).raw_ptr();
|
||||
assert_eq!(first_ptr, second_ptr);
|
||||
drop(owner);
|
||||
}
|
||||
}
|
||||
|
||||
reused_test::<UnsyncStorage>();
|
||||
reused_test::<SyncStorage>();
|
||||
}
|
||||
@@ -22,7 +22,7 @@ slab = { workspace = true }
|
||||
futures-util = { workspace = true}
|
||||
generational-box.workspace = true
|
||||
rustversion = "1.0.17"
|
||||
warnings = { git = "https://github.com/DioxusLabs/warnings" }
|
||||
warnings = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
futures-util = { workspace = true, default-features = false }
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "suspense-carousel"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
async-std = "1.12.0"
|
||||
|
||||
@@ -53,7 +53,7 @@ fullstack = ["dep:dioxus-fullstack"]
|
||||
axum = { workspace = true, features = ["ws"] }
|
||||
dioxus = { workspace = true, features = ["router"] }
|
||||
dioxus-ssr = { workspace = true }
|
||||
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
|
||||
criterion = { workspace = true, features = ["async_tokio", "html_reports"] }
|
||||
ciborium = { version = "0.2.1" }
|
||||
base64 = { version = "0.21.0" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
||||
@@ -22,7 +22,7 @@ once_cell = "1.18.0"
|
||||
rustc-hash = { workspace = true }
|
||||
futures-channel = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
warnings = { git = "https://github.com/DioxusLabs/warnings" }
|
||||
warnings = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
dioxus = { workspace = true }
|
||||
|
||||
@@ -27,16 +27,17 @@ tracing.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
dioxus = { workspace = true }
|
||||
criterion = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
server = ["dioxus-fullstack/server", "dioxus-router/ssr", "dep:dioxus-ssr", "dep:tokio", "dep:http", "dep:axum", "dep:tower-http", "dep:dioxus-hot-reload", "dep:dioxus-cli-config", "dep:tower"]
|
||||
web = ["dioxus-fullstack/web", "dioxus-router/web", "dep:dioxus-web"]
|
||||
|
||||
[[bench]]
|
||||
name = "incremental"
|
||||
required-features = ["ssr"]
|
||||
harness = false
|
||||
# [[bench]]
|
||||
# name = "incremental"
|
||||
# required-features = ["server"]
|
||||
# harness = false
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||
File renamed without changes.
@@ -1,4 +1,9 @@
|
||||
#![allow(non_snake_case)]
|
||||
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
|
||||
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
|
||||
#![deny(missing_docs)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
//! Static generation for Dioxus
|
||||
|
||||
mod config;
|
||||
pub use config::*;
|
||||
|
||||
Reference in new issue
Block a user