So yeah, time to make an announcement.
Over last few weeks I’ve been slowly working on Mediasoup library in Rust.
Server, not client. It communicates with the same unmodified C++ worker as TypeScript library, but from Rust environment.
This is still very early in development, but I figured it would be nice to present minimal implementation and get some feedback from the community.
What I have right now:
- Worker Manager (holds async executor and allows creating Workers, API is almost feature-complete)
- Worker (primarily used to create routers, API is almost feature-complete)
- WebRTC transport (can only create consumers and producers, there is still significant portion of API that is not covered)
- Consumer (API is almost feature-complete, Direct transport-related things are, obviously, missing)
- Producer (API is almost feature-complete, Direct transport-related things are, obviously, missing)
- Way more extensive typing for everything (down to mime types), the only place where
Any
is used isAppData
attached to instances similarly to TypeScript implementation - Only basic smoke tests that make sure C++ worker understands what library sends and library understands what C++ worker responds
- Only Linux support (may work on macOS, will not work on Windows for now)
- 6473 LOC
- Over 70 unresolved TODOs
Where to find it:
- https://crates.io/crates/mediasoup
- https://docs.rs/mediasoup
- https://github.com/nazar-pc/mediasoup/tree/rust
Plans:
- Obviously implement missing functionality
- More typing, more idiomatic Rust in the API
- Replicate tests from TypeScript library and maybe add some more
- Import docs from mediasoup.org such that documentation on docs.rs is self-contained and has lots of examples
- Upstream this as one of the officially supported libraries