diff --git a/sixtyfps_runtime/corelib/abi/sharedarray.rs b/sixtyfps_runtime/corelib/abi/sharedarray.rs index 80475c93e..96a29fd8d 100644 --- a/sixtyfps_runtime/corelib/abi/sharedarray.rs +++ b/sixtyfps_runtime/corelib/abi/sharedarray.rs @@ -190,14 +190,3 @@ pub unsafe extern "C" fn sixtyfps_shared_array_drop(out: *mut SharedArray) { // ?? This won't call drop on the right type... core::ptr::read(out); } - -/// Somehow this is required for the extern "C" things to be exported in a dependent dynlib -#[doc(hidden)] -pub fn dummy() { - #[derive(Clone)] - struct Foo; - foo(Foo); - fn foo(f: impl Clone) { - let _ = f.clone(); - } -} diff --git a/sixtyfps_runtime/corelib/abi/signals.rs b/sixtyfps_runtime/corelib/abi/signals.rs index d14349d5f..f499bcd2b 100644 --- a/sixtyfps_runtime/corelib/abi/signals.rs +++ b/sixtyfps_runtime/corelib/abi/signals.rs @@ -112,14 +112,3 @@ pub unsafe extern "C" fn sixtyfps_signal_set_handler( pub unsafe extern "C" fn sixtyfps_signal_drop(handle: *mut SignalOpaque) { core::ptr::read(handle as *mut Signal<()>); } - -/// Somehow this is required for the extern "C" things to be exported in a dependent dynlib -#[doc(hidden)] -pub fn dummy() { - #[derive(Clone)] - struct Foo; - foo(Foo); - fn foo(f: impl Clone) { - let _ = f.clone(); - } -} diff --git a/sixtyfps_runtime/corelib/abi/tests.rs b/sixtyfps_runtime/corelib/abi/tests.rs index bcf5cb85b..6c6b8f796 100644 --- a/sixtyfps_runtime/corelib/abi/tests.rs +++ b/sixtyfps_runtime/corelib/abi/tests.rs @@ -12,14 +12,3 @@ pub extern "C" fn sixtyfps_test_ellapse_time(time_in_ms: u64) { driver.update_animations(tick) }) } - -/// Somehow this is required for the extern "C" things to be exported in a dependent dynlib -#[doc(hidden)] -pub fn dummy() { - #[derive(Clone)] - struct Foo; - foo(Foo); - fn foo(f: impl Clone) { - let _ = f.clone(); - } -} diff --git a/sixtyfps_runtime/corelib/layout.rs b/sixtyfps_runtime/corelib/layout.rs index ce66a1e99..b8e818107 100644 --- a/sixtyfps_runtime/corelib/layout.rs +++ b/sixtyfps_runtime/corelib/layout.rs @@ -246,13 +246,3 @@ pub extern "C" fn solve_path_layout(data: &PathLayoutData) { } } -/// Somehow this is required for the extern "C" things to be exported in a dependent dynlib -#[doc(hidden)] -pub fn dummy() { - #[derive(Clone)] - struct Foo; - foo(Foo); - fn foo(f: impl Clone) { - let _ = f.clone(); - } -} diff --git a/sixtyfps_runtime/corelib/lib.rs b/sixtyfps_runtime/corelib/lib.rs index 152a58094..d92774837 100644 --- a/sixtyfps_runtime/corelib/lib.rs +++ b/sixtyfps_runtime/corelib/lib.rs @@ -61,3 +61,15 @@ pub type ComponentRefPin<'a> = core::pin::Pin usize { + abi::tests::sixtyfps_test_ellapse_time as usize + + abi::signals::sixtyfps_signal_init as usize + + abi::sharedarray::sixtyfps_shared_array_drop as usize + + layout::solve_grid_layout as usize +} diff --git a/sixtyfps_runtime/rendering_backends/gl/lib.rs b/sixtyfps_runtime/rendering_backends/gl/lib.rs index c7c5b809d..760665ec1 100644 --- a/sixtyfps_runtime/rendering_backends/gl/lib.rs +++ b/sixtyfps_runtime/rendering_backends/gl/lib.rs @@ -730,3 +730,10 @@ pub fn create_gl_window() -> ComponentWindow { GLRenderer::new(&event_loop.get_winit_event_loop(), window_builder) })) } + + +#[doc(hidden)] +#[cold] +pub fn use_modules() { + sixtyfps_corelib::use_modules(); +}