diff --git a/tavern/Cargo.toml b/tavern/Cargo.toml index 96cfa91..cb9521f 100644 --- a/tavern/Cargo.toml +++ b/tavern/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tavern" -version = "0.2.4" +version = "0.2.5" edition = "2024" description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus." repository = "/CyberMages/tavern" @@ -14,7 +14,7 @@ license = "Apache-2.0" chrono = { version = "0.4.41", features = ["serde"] } pulldown-cmark = "0.13.0" serde = { version = "1.0.219", features = ["derive"] } -sqlx = { version = "0.8.6", features = ["sqlite", "chrono", "runtime-tokio"] } +sqlx = { version = "0.8.6", features = ["sqlite", "chrono", "runtime-tokio"], optional = true} toml = "0.9.5" [dev-dependencies] @@ -23,4 +23,6 @@ tokio = { version = "1", features = ["full"] } [features] -publisher = [] +default = [] +database = ["sqlx"] +publisher = ["database"] diff --git a/tavern/src/lib.rs b/tavern/src/lib.rs index 1e86806..fc9d6a2 100644 --- a/tavern/src/lib.rs +++ b/tavern/src/lib.rs @@ -6,6 +6,7 @@ mod info; mod adventurer; #[cfg(feature = "publisher")] mod converter; +#[cfg(feature = "database")] mod database; mod tale; mod tavern; @@ -13,6 +14,7 @@ mod tavern; pub use crate::adventurer::{Adventurer, Legend}; +#[cfg(feature = "database")] pub use crate::database::Database; pub use crate::info::{get_name, get_version}; pub use crate::tale::{Lore, Tale};