[PR #487] [CLOSED] Migrate to futures 0.3/Tokio 0.2 #948

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/487
Author: @ashthespy
Created: 6/7/2020
Status: Closed

Base: tokio_migrationHead: tokio_03


📝 Commits (10+)

  • fcbd600 [Core] Bump hyper to ~0.12
  • 19d9b02 [Connect] Migrate to hyper ~v12
  • 6dd9e0e Clean up hyper from binary
  • d52c58b WIP tokio-core -> tokio migration
  • 5d48c88 Migrate to tokio 0.1
  • be4ae92 [Connect] Migrate to tokio 0.1
  • 7f6e666 WIP Futures
  • 80c3e93 [Core/connection] Refactor to async/await
  • eee8ada [AudioKeyManager] Convert to async
  • 6c59bb7 Fix tokio dependency in main

📊 Changes

34 files changed (+2025 additions, -1816 deletions)

View changed files

📝 Cargo.lock (+1399 -1200)
📝 Cargo.toml (+2 -2)
📝 audio/Cargo.toml (+2 -1)
📝 audio/src/fetch.rs (+65 -69)
📝 connect/Cargo.toml (+7 -3)
📝 connect/src/discovery.rs (+39 -31)
📝 connect/src/lib.rs (+1 -1)
📝 core/Cargo.toml (+9 -7)
📝 core/src/apresolve.rs (+33 -51)
📝 core/src/audio_key.rs (+15 -23)
📝 core/src/channel.rs (+32 -31)
📝 core/src/connection/codec.rs (+5 -5)
📝 core/src/connection/handshake.rs (+75 -149)
📝 core/src/connection/mod.rs (+65 -77)
📝 core/src/keymaster.rs (+7 -5)
📝 core/src/lib.rs (+7 -7)
📝 core/src/mercury/mod.rs (+15 -13)
📝 core/src/mercury/sender.rs (+13 -11)
📝 core/src/proxytunnel.rs (+38 -24)
📝 core/src/session.rs (+109 -68)

...and 14 more files

📄 Description

Fixes #178

Following up from #424, I thought it would be better if we create a new branch and we can all chip at it? @marcelbuesing @leshow What do you guys think?

What I've managed to do so far is to get Core/connection up and running (without the proxy tunnel). I also wrote some rudimentary tests to confirm it actually works - I had to cheat and remove all the fluff that didn't compile though..

Currently there is a lot of expected enum std::task::Poll, found enum std::result::Result` that needs to be fixed. But I do see the simplicity of async/await, so we can take a call and refactor to async/await where possible, but it would good to have some simple tests as well..


🔄 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/487 **Author:** [@ashthespy](https://github.com/ashthespy) **Created:** 6/7/2020 **Status:** ❌ Closed **Base:** `tokio_migration` ← **Head:** `tokio_03` --- ### 📝 Commits (10+) - [`fcbd600`](https://github.com/librespot-org/librespot/commit/fcbd6005b2ab17b1c3fafe2c21ea2535caf43dbf) [Core] Bump hyper to ~0.12 - [`19d9b02`](https://github.com/librespot-org/librespot/commit/19d9b02a5974b34cec4ec078b7ae5d64e875a2ac) [Connect] Migrate to hyper ~v12 - [`6dd9e0e`](https://github.com/librespot-org/librespot/commit/6dd9e0e489c472456a205e511983c854401fe120) Clean up hyper from binary - [`d52c58b`](https://github.com/librespot-org/librespot/commit/d52c58ba2ff0fc0a6fa469e7c2c3516e16bd389e) WIP tokio-core -> tokio migration - [`5d48c88`](https://github.com/librespot-org/librespot/commit/5d48c881eaee8ad16d0790cda2b87c9e7bbd480f) Migrate to `tokio` 0.1 - [`be4ae92`](https://github.com/librespot-org/librespot/commit/be4ae92b22f2a4554d734f70fc364277056e5973) [Connect] Migrate to `tokio` 0.1 - [`7f6e666`](https://github.com/librespot-org/librespot/commit/7f6e666267aae3bdfe5acf3af4ed86d66ad00d5c) WIP Futures - [`80c3e93`](https://github.com/librespot-org/librespot/commit/80c3e9381a1c418c0461349dda45e9f833fa11a1) [Core/connection] Refactor to async/await - [`eee8ada`](https://github.com/librespot-org/librespot/commit/eee8ada1bb4c29f77a8bb5b5e58b40cfcc9a88a9) [AudioKeyManager] Convert to async - [`6c59bb7`](https://github.com/librespot-org/librespot/commit/6c59bb7815e846652e0c6d2eb8ee47cfcf26105e) Fix tokio dependency in main ### 📊 Changes **34 files changed** (+2025 additions, -1816 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+1399 -1200) 📝 `Cargo.toml` (+2 -2) 📝 `audio/Cargo.toml` (+2 -1) 📝 `audio/src/fetch.rs` (+65 -69) 📝 `connect/Cargo.toml` (+7 -3) 📝 `connect/src/discovery.rs` (+39 -31) 📝 `connect/src/lib.rs` (+1 -1) 📝 `core/Cargo.toml` (+9 -7) 📝 `core/src/apresolve.rs` (+33 -51) 📝 `core/src/audio_key.rs` (+15 -23) 📝 `core/src/channel.rs` (+32 -31) 📝 `core/src/connection/codec.rs` (+5 -5) 📝 `core/src/connection/handshake.rs` (+75 -149) 📝 `core/src/connection/mod.rs` (+65 -77) 📝 `core/src/keymaster.rs` (+7 -5) 📝 `core/src/lib.rs` (+7 -7) 📝 `core/src/mercury/mod.rs` (+15 -13) 📝 `core/src/mercury/sender.rs` (+13 -11) 📝 `core/src/proxytunnel.rs` (+38 -24) 📝 `core/src/session.rs` (+109 -68) _...and 14 more files_ </details> ### 📄 Description Fixes #178 Following up from #424, I thought it would be better if we create a new branch and we can all chip at it? @marcelbuesing @leshow What do you guys think? What I've managed to do so far is to get Core/connection up and running (without the proxy tunnel). I also wrote some rudimentary tests to confirm it actually works - I had to cheat and remove all the fluff that didn't compile though.. Currently there is a lot of `expected enum `std::task::Poll`, found enum `std::result::Result` that needs to be fixed. But I do see the simplicity of async/await, so we can take a call and refactor to async/await where possible, but it would good to have some simple tests as well.. --- <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:34 +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#948
No description provided.