Updated to use the new Dioxus v0.7.0-rc.1
The system is using the nightly toolchain now due to Dioxus needing it.
This commit is contained in:
@ -1,23 +1,23 @@
|
||||
[package]
|
||||
name = "blog_test"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
authors = ["Myrddin Dundragon <myrddin@cybermages.tech>"]
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
axum = { version = "0.7.0", optional = true }
|
||||
axum-server = { version = "0.7.1", optional = true }
|
||||
dioxus = { version = "*", features = ["router", "fullstack"] }
|
||||
dioxus-cli-config = { version = "*", optional = true }
|
||||
axum = { version = "0.8.4", optional = true }
|
||||
axum-server = { version = "0.7.2", optional = true }
|
||||
dioxus = { version = "=0.7.0-rc.1", features = ["router", "fullstack"] }
|
||||
#dioxus-cli-config = { version = "*", optional = true }
|
||||
bard = { version = "*", path="../bard", optional = true }
|
||||
tokio = { version = "1.0", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["web"]
|
||||
web = ["dioxus/web", "bard"]
|
||||
server = ["dioxus/server", "axum", "axum-server", "tokio/rt-multi-thread", "tokio/macros", "dioxus-cli-config", "bard/server"]
|
||||
default = ["bard"]
|
||||
web = ["dioxus/web", "bard/web"]
|
||||
server = ["dioxus/server", "axum", "axum-server", "tokio/rt-multi-thread", "tokio/macros", "bard/server"]
|
||||
|
||||
[profile.wasm-dev]
|
||||
inherits = "dev"
|
||||
|
||||
@ -8,18 +8,20 @@ const FAVICON: Asset = asset!("/assets/favicon.ico");
|
||||
const BLOG: Asset = asset!("/assets/blog.css");
|
||||
|
||||
|
||||
|
||||
fn main()
|
||||
{
|
||||
#[cfg(feature = "server")]
|
||||
{
|
||||
let _ = tokio::runtime::Runtime::new()
|
||||
.unwrap()
|
||||
.block_on(async move { bard::init_database("/home/myrddin/cybermages/website/tavern.db").await });
|
||||
let rt = tokio::runtime::Runtime::new().unwrap();
|
||||
rt.block_on(async
|
||||
{
|
||||
let db_path = "/home/myrddin/cybermages/website/tavern.db";
|
||||
|
||||
let _ = bard::init_database(db_path).await;
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(feature = "web")]
|
||||
dioxus::launch(App);
|
||||
LaunchBuilder::new().launch(App);
|
||||
}
|
||||
|
||||
#[component]
|
||||
|
||||
Reference in New Issue
Block a user