RustAudio / ogg

Ogg container decoder and encoder written in pure Rust
Other
113 stars 21 forks source link

async_api uses deprecated tokio_io crate, and outdated versions of futures and bytes #23

Closed PAndaContron closed 2 years ago

PAndaContron commented 3 years ago

The tokio_io crate has been deprecated for quite some time; the AsyncRead trait now resides in tokio::io and tokio_io::codec seems to have been moved to tokio_util. This is a pretty massive headache to work around, since most functions from other libraries give a tokio::io::AsyncRead, which is completely incompatible with the deprecated tokio_io version.

The async api also uses fairly old versions of futures and bytes, which probably need to be updated as well for compatibility with the current version of tokio.

It seems like it shouldn't take much refactoring to update this; as far as I can tell the only change affecting the implementation of the async api is Stream::poll being changed to Stream::poll_next. This would be a breaking change though, due to the aforementioned incompatibility between tokio::io::AsyncRead and tokio_io::AsyncRead.

est31 commented 3 years ago

Yeah my plan is a new major release using the 2021 edition, and updated to use newest futures and bytes dependencies.

est31 commented 3 years ago

edition 2021 is released in october FWIW.

a1phyr commented 3 years ago

Yeah my plan is a new major release using the 2021 edition

Why wait the release of the new edition ? Changing the edition is not breaking.

est31 commented 3 years ago

@a1phyr increasing the MSRV is, at least I treat it that way.