[PR #574] [CLOSED] Migrate to futures 0.3 / tokio 1.0 #977

Closed
opened 2026-02-27 20:00:41 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/574
Author: @Johannesd3
Created: 1/21/2021
Status: Closed

Base: tokio_migrationHead: futures_migration


📝 Commits (9)

  • 40e6355 Migrate core to tokio 1.0
  • 6867ad0 Added test
  • 424ba3a Migrated metadata crate to futures 0.3
  • 80d384e Migrated audio crate to futures 0.3
  • 90905b8 Improved RangeSet implementation
  • 0895f17 Migrated playback crate to futures 0.3
  • 6c9d8c8 Replace pin_project and updated dependencies
  • fe37186 Make librespot_playback work
  • 91d7d04 Preparing main crate for testing

📊 Changes

32 files changed (+2465 additions, -3706 deletions)

View changed files

📝 Cargo.lock (+1366 -1788)
📝 Cargo.toml (+13 -27)
📝 audio/Cargo.toml (+6 -5)
📝 audio/src/decrypt.rs (+2 -2)
📝 audio/src/fetch.rs (+407 -366)
📝 audio/src/lib.rs (+6 -3)
📝 audio/src/range_set.rs (+8 -12)
📝 core/Cargo.toml (+15 -14)
📝 core/src/apresolve.rs (+47 -79)
📝 core/src/audio_key.rs (+3 -19)
📝 core/src/authentication.rs (+4 -6)
📝 core/src/channel.rs (+53 -38)
📝 core/src/component.rs (+0 -26)
📝 core/src/connection/codec.rs (+3 -4)
📝 core/src/connection/handshake.rs (+50 -123)
📝 core/src/connection/mod.rs (+50 -72)
📝 core/src/diffie_hellman.rs (+6 -6)
📝 core/src/keymaster.rs (+6 -14)
📝 core/src/lib.rs (+10 -14)
📝 core/src/mercury/mod.rs (+55 -51)

...and 12 more files

📄 Description

Here's an attempt to migrate librespot to futures 0.3 and tokio 1.0. I'm sorry if this is competing with #487, but I had already started, when I saw this PR (that has been inactive for a while). It's totally ok if you decide in favour of the other PR, but nonetheless I want to offer my help.

The crates core, metadata, audio and playback will compile, but of course that doesn't mean that they'll work correctly. (I was not sure how to test it before finishing everything). However, I had to remove the proxy support in apresolve.rs, since I wasn't able to get hyper-proxy to work with hyper 0.14.

The remaining crate librespot_connect seems to be the hardest, I wasn't able to make any progress here. I still hope my PR is of some help.

Edit: This tokio_migration branch is far behind dev, so the comparison to dev is perhaps better.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/574 **Author:** [@Johannesd3](https://github.com/Johannesd3) **Created:** 1/21/2021 **Status:** ❌ Closed **Base:** `tokio_migration` ← **Head:** `futures_migration` --- ### 📝 Commits (9) - [`40e6355`](https://github.com/librespot-org/librespot/commit/40e6355c34a72f7ac0980770082e06099eb91451) Migrate core to tokio 1.0 - [`6867ad0`](https://github.com/librespot-org/librespot/commit/6867ad0750d6be9e95d3e11f38d09cc53a38c3d3) Added test - [`424ba3a`](https://github.com/librespot-org/librespot/commit/424ba3ae2596854514767c824ac2a24d5abb355d) Migrated metadata crate to futures 0.3 - [`80d384e`](https://github.com/librespot-org/librespot/commit/80d384e00164b61f4ef9c52acee345300e091341) Migrated audio crate to futures 0.3 - [`90905b8`](https://github.com/librespot-org/librespot/commit/90905b81bb681d3bd44832513caf58c2a8737019) Improved RangeSet implementation - [`0895f17`](https://github.com/librespot-org/librespot/commit/0895f17f8a85bdcf1624138fac5c3960796240b7) Migrated playback crate to futures 0.3 - [`6c9d8c8`](https://github.com/librespot-org/librespot/commit/6c9d8c8d83dd23cc69f1a00941a4feeadcb370d7) Replace pin_project and updated dependencies - [`fe37186`](https://github.com/librespot-org/librespot/commit/fe371868046222690f6104ba2742ce73589c2e25) Make librespot_playback work - [`91d7d04`](https://github.com/librespot-org/librespot/commit/91d7d0422b05b03f437e4789f284ceac0592131f) Preparing main crate for testing ### 📊 Changes **32 files changed** (+2465 additions, -3706 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+1366 -1788) 📝 `Cargo.toml` (+13 -27) 📝 `audio/Cargo.toml` (+6 -5) 📝 `audio/src/decrypt.rs` (+2 -2) 📝 `audio/src/fetch.rs` (+407 -366) 📝 `audio/src/lib.rs` (+6 -3) 📝 `audio/src/range_set.rs` (+8 -12) 📝 `core/Cargo.toml` (+15 -14) 📝 `core/src/apresolve.rs` (+47 -79) 📝 `core/src/audio_key.rs` (+3 -19) 📝 `core/src/authentication.rs` (+4 -6) 📝 `core/src/channel.rs` (+53 -38) 📝 `core/src/component.rs` (+0 -26) 📝 `core/src/connection/codec.rs` (+3 -4) 📝 `core/src/connection/handshake.rs` (+50 -123) 📝 `core/src/connection/mod.rs` (+50 -72) 📝 `core/src/diffie_hellman.rs` (+6 -6) 📝 `core/src/keymaster.rs` (+6 -14) 📝 `core/src/lib.rs` (+10 -14) 📝 `core/src/mercury/mod.rs` (+55 -51) _...and 12 more files_ </details> ### 📄 Description Here's an attempt to migrate librespot to futures 0.3 and tokio 1.0. I'm sorry if this is competing with #487, but I had already started, when I saw this PR (that has been inactive for a while). It's totally ok if you decide in favour of the other PR, but nonetheless I want to offer my help. The crates core, metadata, audio and playback will compile, but of course that doesn't mean that they'll work correctly. (I was not sure how to test it before finishing everything). However, I had to remove the proxy support in apresolve.rs, since I wasn't able to get hyper-proxy to work with hyper 0.14. The remaining crate librespot_connect seems to be the hardest, I wasn't able to make any progress here. I still hope my PR is of some help. Edit: This tokio_migration branch is far behind dev, so the [comparison to dev](https://github.com/librespot-org/librespot/compare/dev...Johannesd3:futures_migration) is perhaps better. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#977
No description provided.