webrtc-rs / webrtc

A pure Rust implementation of WebRTC
https://webrtc.rs
Apache License 2.0
4.14k stars 366 forks source link

How can I easily use this as a C library in place of libwebrtc? #602

Open nonibytes opened 2 months ago

seanchann commented 2 months ago

This project is incomplete and does not support the management of media devices. For example, audio capture and playback. so I think it needs you to extend by yourself

ris-work commented 2 months ago

I would say that it will be extremely hard to use C with this as this project also uses async for which you need your own async executors. I would imagine that the FFI story is bad with async whether the 'other' language supports async or not. I wish there was a more threaded simple sync API, would at least make the FFI story better. Moreover, C does not have the lifetime checks and guarantees which are provided by rustc.

dxh-sc commented 2 months ago

Yes, i am thinking why don't support simple sync API.