Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tokio v1 #76

Merged
merged 1 commit into from
Jul 28, 2021
Merged

tokio v1 #76

merged 1 commit into from
Jul 28, 2021

Conversation

Tarnadas
Copy link
Contributor

Hey,

here is another attempt at updating tokio to v1.
Some remarks:

  • I needed to enable the "rt-multi-thread" feature. Otherwise the tcp server would just block and nothing happens.
  • I replaced tokio-serial with serial-io, a custom fork I made based on mio-serial and tokio-serial. It basically just adds tokio v1 support via a feature flag instead of splitting it into different crates. Also all other dependencies have been updated. I checked this PR and made sure that I fixed this.
  • serialport-rs changed its interface to a builder pattern, which is why the API of serial-io is slightly different.
  • I renamed Serial to AsyncSerial, because the regular Serial in serial-io has no tokio support. I'm not sure, if I should change the name.
  • I have only tested the TCP async stuff.

Changelog:

  • update tokio to v1
  • update bytes to v1
  • update tokio-util to v0.6
  • replace tokio-serial with serial-io
  • add sync rtu client example
  • replace example cfg flags with cargo toml required features

closes #71 and #72

- update tokio to v1
- update bytes to v1
- update tokio-util to v0.6
- replace tokio-serial with serial-io
- add sync rtu client example
- replace example cfg flags with cargo toml required features
@lovasoa
Copy link
Contributor

lovasoa commented Jun 14, 2021

Hello !
We would need this for our work @enexflow. Let us know if there is anything we can do to help this getting merged :)

@flosse

@Tarnadas
Copy link
Contributor Author

It looks like Windows support for tokio based serial stuff can be worked on once tokio-rs/tokio#3760 is merged. This would be needed for Modbus RTU. I suppose Windows support should not be dropped from tokio-modbus, thus merging is blocked

@lovasoa
Copy link
Contributor

lovasoa commented Jun 20, 2021

Hello ! tokio-rs/tokio#3760 was merged and released.
Is there something else that is blocking ?

@ColinFinck
Copy link
Collaborator

@Tarnadas I just got the required PR for Windows compatibility into tokio-serial (berkowski/tokio-serial@693e7ee), with a follow-up PR likely to be merged soon (berkowski/tokio-serial#41)
I expect this to be released as tokio-serial 4.4.0

Could you already restructure your PR around that version of tokio-serial?
This would give us an updated tokio-modbus just in time when the tokio-serial update is on crates.io.

@ColinFinck ColinFinck mentioned this pull request Jul 14, 2021
@flosse flosse merged commit e6e4b34 into slowtec:master Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to tokio 0.3
4 participants