webrtc-rs/sdp

Is refactoring welcome?

Closed this issue · 3 comments

Hi, @rainliu! First of all, thank you for your efforts!

I haven't had any meaningful experience with WebRTC before, but I'm going to learn it very carefully up from the ground. On the other hand, I have some serious proficieny in Rust (2 years in production). I'd like to offer my contributions to webrtc-rs projects if you'd like to accept them.

As I see, the code now is merely a clone of the similar Go code from Pion, and is not as idiomatic as you can meet in Rust ecosystem. From the first glance I see a lot of redundant boxing and using comments instead docs.

I'm going both to learn and to Rustify this crate in the process, so make it meet the community "standards" and "expections". This may also involve some signatures changes to more idiomatic ones (I'll try to give the reasoning where and why) and significant crate refactoring.

Will such contributions be welcome?

Thanks!

@tyranron, yes, the refactoring to idiomatic Rust is greatly welcome. Please go ahead to do it.

Don't worry about API signatures changes, because we use crate version. We can gradually upgrade version for other dependent webrtc-rs crates.

Do you prefer to collect breaking changes into batches to minimize major version churn, or just go for it as they pop up?

@scottlamb, I just created a branch https://github.com/webrtc-rs/sdp/tree/v0.2dev for this crate Rustify purpose.

You can pull request to this branch first. Once it is stabilized, will merge it to main branch.