Skip to content

Using AWC client inside tauri application #3129

Answered by robjtede
RProduction asked this question in Q&A
Discussion options

You must be logged in to vote

Firstly, you don't need a server to run awc.

You can use the actix-rt macro to get a usable secondary thread.

// this macro expands to a sync function
#[actix_rt::main]
async fn non_main_thread() {
   let client = awc::Client::default();
}

std::thread::spawn(move || non_main_thread());

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by robjtede
Comment options

You must be logged in to vote
0 replies
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