publish client-sdk-native (#12)
* Create README.md * add example * crates & examples * fix syntax * add LICENSE * thirdparty LICENSE * rearrange repo * fix build * egui versions * prepare publish * fix demo compilation * add test ci * Update rust.yml * forgot runs-on * install protoc before building * avoid rate limit * include submodules * updates to readme * cache rust builds Co-authored-by: David Zhao <[email protected]> Co-authored-by: David Zhao <[email protected]>
This commit is contained in:
co-authored by
David Zhao
David Zhao
parent
a927baac94
commit
a07b3451a3
@@ -0,0 +1,20 @@
|
||||
use cxx::SharedPtr;
|
||||
|
||||
use webrtc_sys::webrtc as sys_rtc;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RTCRuntime {
|
||||
cxx_handle: SharedPtr<sys_rtc::ffi::RTCRuntime>,
|
||||
}
|
||||
|
||||
impl RTCRuntime {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
cxx_handle: sys_rtc::ffi::create_rtc_runtime(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn release(self) -> SharedPtr<sys_rtc::ffi::RTCRuntime> {
|
||||
self.cxx_handle
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user