Rust Audio

Planned breaking changes to the rtrb crate

I’ve announced the rtrb crate some time ago:

Now I’m planning some breaking API changes for an upcoming 0.2 release and it would be great to get some feedback!

The main change is this PR:

… but feel free to have a look at the other PRs and issues as well.

I’ve also asked about this on URLO, so you can also respond over there:

I’ve left some general comments on the URLO thread and a specific comment on GitHub.

An even more general question: is it needed to make this a breaking change? Is it possible to just add things (and mark old things as deprecated)? (I haven’t used rtrb myself yet, so I really can’t tell.)

Thanks for that!

With my original PR Support for fixed-size chunks by mgeier · Pull Request #50 · mgeier/rtrb · GitHub it indeed needed to be a breaking change, but with my new alternative PR Support for fixed-size chunks (alternative) by mgeier · Pull Request #52 · mgeier/rtrb · GitHub it isn’t strictly necessary anymore.

Currently, there are a few breaking changes, but they could be avoided if we really want to:

  • Move some stuff to the new chunks sub-module. I think this is helpful because it makes the main page of the docs much cleaner.

  • Get rid of the with_chunks() method. This method doesn’t really make sense anymore after the proposed PR. We could keep it, but I think it would cause more confusion than it helps anyone.

  • Get rid of the reset() method, which isn’t really necessary anymore. I’m not sure whether it ever was necessary.

  • Get rid of the split() method. I’m still open for discussions about that. This is also the one breaking change that might affect most users.

AFAICT, the crate doesn’t really have a huge amount of users yet, so I think it would still be fine to make breaking changes.
Also, it’s at version 0.1.x and it’s only 6 months old, so a breaking change shouldn’t be too surprising for anyone.
And I very much prefer a breaking change soon to a breaking change in 6 months.

BTW, I’d also like to implement Return `&mut [T]` from `copy_to_uninit()`? · Issue #47 · mgeier/rtrb · GitHub, which is strictly speaking a breaking change, but it will probably affect nobody.

Do you really think it is worth avoiding breaking changes at this point?

And if we indeed make a breaking change, do you have any further suggestions for breaking changes so we can include it in version 0.2?

It’s just something I tend to do, but it’s probably not a big issue for anybody (upgrading a dependency is typically not a lot of work in Rust, I expect this crate to be no different).

A little update:

I’ve just released above-mentioned breaking changes:

The new and improved documentation is available at:

The release notes are available at:

Please create an issue if there are any problems!

Further API changes are already planned, but this time they will be non-breaking: