Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Newer version of Tokio #129

Closed
andrewrynhard opened this issue Mar 19, 2021 · 3 comments · Fixed by #131
Closed

Newer version of Tokio #129

andrewrynhard opened this issue Mar 19, 2021 · 3 comments · Fixed by #131

Comments

@andrewrynhard
Copy link

Any thoughts on updating the version of Tokio to 1.3? Importing 1.3 and 0.2 into my crate is not the end of the world, but having one Tokio library to work with would be nice.

@rhdxmr
Copy link
Collaborator

rhdxmr commented Mar 20, 2021

Thank you @andrewrynhard for your suggestion.

When I build examples of redbpf, tokio v0.2.22(https://github.com/tokio-rs/tokio/releases/tag/tokio-0.2.22) is selected by cargo dependency resolution. It is 433 commits behind the current master. Yes there is a huge gap between the old and new. And tokio started releasing stable versions since Dec 24, 2020.

I lean to updating tokio, but I am not sure that updating causes side effect to existing users of redbpf. So I am going to look into it.
What do you think of this @rsdy?

@rhdxmr
Copy link
Collaborator

rhdxmr commented Mar 22, 2021

I found some helpful articles about dependency resolution that Cargo performs.

https://doc.rust-lang.org/cargo/reference/resolver.html
https://stephencoakley.com/2019/04/24/how-rust-solved-dependency-hell

These documents helped me understand what would happen if Tokio version is
changed. And it also help me think of how to examine whether the change incurs
some problems.

Before writing some code, what I should inspect are these:

  • whether Tokio has links field in Cargo.toml
  • whether RedBPF exposes some structures or enums of Tokio to clients

I am going to write some PR for upgrading Tokio in this week.

@rsdy
Copy link
Collaborator

rsdy commented Mar 22, 2021

I think the upgrade should be fairly straightforward, and now with Actix following 1.x, I think we're all clear to make the move. I am not aware of exposing any Tokio-related structs through RedBPF, so I think just need to track down the API changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants