Skip to content

main_event_loop.md: Port ashpd features from async-std to async-io#2273

Open
ratijas wants to merge 3 commits into
gtk-rs:mainfrom
ratijas:patch-1
Open

main_event_loop.md: Port ashpd features from async-std to async-io#2273
ratijas wants to merge 3 commits into
gtk-rs:mainfrom
ratijas:patch-1

Conversation

@ratijas
Copy link
Copy Markdown

@ratijas ratijas commented Mar 21, 2026

async-std is no longer a feature of ashpd crate, and async-io replaced it. In fact, the whole async-std is deprecated in favor of smol.

`async-std` is no longer a feature of `ashpd` crate, and `async-io` replaced
it. In fact, the whole `async-std` is deprecated in favor of `smol`.
@ratijas ratijas requested a review from Hofer-Julian as a code owner March 21, 2026 16:59
@ratijas
Copy link
Copy Markdown
Author

ratijas commented Mar 21, 2026

Looking into ashpd source code:

#[cfg(all(all(feature = "tokio", feature = "async-io"), not(doc)))]
compile_error!("You can't enable both async-io & tokio features at once");
#[cfg(all(not(feature = "tokio"), not(feature = "async-io"), not(doc)))]
compile_error!("Either the `async-io` or the `tokio` feature has to be enabled");

I don't know the whole story, but it looks like tokio XOR async-io. I'm not sure how smol fits into this picture; I guess smol is a direct alternative to gio event loop?

Also, account feature needs to be enabled for the presented example to work.

#[cfg_attr(docsrs, doc(cfg(feature = "account")))]
#[cfg(feature = "account")]
pub mod account;

The module `ashpd::desktop::account` is feature-gated.
@ratijas
Copy link
Copy Markdown
Author

ratijas commented Mar 21, 2026

Also the example uses reqwest@0.12, but 0.13.2 is available, and 0.13 has brought breaking changes in features:

rustls is now the default TLS backend, instead of native-tls.
rustls-tls has been renamed to rustls.

The `reqwest@0.13` has brought some breaking changes in its feature names:

> `rustls` is now the default TLS backend, instead of `native-tls`.
> `rustls-tls` has been renamed to `rustls`.
@Hofer-Julian
Copy link
Copy Markdown
Collaborator

Can you please check this out @bilelmoussaoui?

@ratijas
Copy link
Copy Markdown
Author

ratijas commented Mar 21, 2026

There are couple more recommendations of async-std on the page, they should probably be either dropped or replaced with async-io depending on context. I'm still figuring this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants