Skip to content

Desktop/Mobile apps with persistent local storage #3898

Answered by domdelorenzo
domdelorenzo asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @ealmloff, thanks for the reply. I think that got me going.

The first expression is missing some parens and an attribute. Should that be something like this?

#[cfg(not(any(feature = "web", feature = "server")))]
type ServerFnError = dioxus::CapturedError;

For the second expression, suppose I'm using the local thread macro from the hot dog tutorial. If I want to ship a desktop and mobile app that don't require a server, but also have the option to ship a fullstack web app with it's own server binary, would I just add in the desktop/mobile features...

#[cfg(feature = "server")]
thread_local! {
    pub static DB: rusqlite::Connection = {
    // and so on...

...like so?

#[cfg(any(feature = 

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@domdelorenzo
Comment options

Answer selected by domdelorenzo
@ealmloff
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants