File ringrtc-rust-hidden-visibility.patch of Package nodejs-signal-ringrtc
Do not export internal FFI glue symbols from the final library, while making them still unmangled for the linker. See https://github.com/rust-lang/rust/issues/73958
This is likely not upstreamable due to depending on the details of the rustc linux port.
--- ringrtc-2.53.0/ringrtc/rust/src/webrtc/sdp_observer.rs.orig 2025-06-02 21:18:01.000000000 +0200
+++ ringrtc-2.53.0/ringrtc/rust/src/webrtc/sdp_observer.rs 2025-07-04 20:26:07.154144631 +0200
@@ -482,6 +482,7 @@ impl CreateSessionDescriptionObserver {
}
/// CreateSessionDescription observer OnSuccess() callback.
+core::arch::global_asm!(".hidden csd_observer_OnSuccess");
#[no_mangle]
#[allow(non_snake_case)]
extern "C" fn csd_observer_OnSuccess(
@@ -500,6 +501,7 @@ extern "C" fn csd_observer_OnSuccess(
}
/// CreateSessionDescription observer OnFailure() callback.
+core::arch::global_asm!(".hidden csd_observer_OnFailure");
#[no_mangle]
#[allow(non_snake_case)]
extern "C" fn csd_observer_OnFailure(
@@ -657,6 +659,7 @@ impl SetSessionDescriptionObserver {
}
/// SetSessionDescription observer OnSuccess() callback.
+core::arch::global_asm!(".hidden ssd_observer_OnSuccess");
#[no_mangle]
#[allow(non_snake_case)]
extern "C" fn ssd_observer_OnSuccess(
@@ -673,6 +676,7 @@ extern "C" fn ssd_observer_OnSuccess(
}
/// SetSessionDescription observer OnFailure() callback.
+core::arch::global_asm!(".hidden ssd_observer_OnFailure");
#[no_mangle]
#[allow(non_snake_case)]
extern "C" fn ssd_observer_OnFailure(
--- ringrtc-2.53.0/ringrtc/rust/src/webrtc/stats_observer.rs.orig 2025-06-02 21:18:01.000000000 +0200
+++ ringrtc-2.53.0/ringrtc/rust/src/webrtc/stats_observer.rs 2025-07-04 20:26:17.190142584 +0200
@@ -584,6 +584,7 @@ pub struct MediaStatistics {
}
/// StatsObserver OnStatsComplete() callback.
+core::arch::global_asm!(".hidden stats_observer_OnStatsComplete");
#[no_mangle]
#[allow(non_snake_case)]
extern "C" fn stats_observer_OnStatsComplete(