Smaller workaround for the fact that some function are not exported

This commit is contained in:
Olivier Goffart 2020-07-23 17:11:00 +02:00
parent f1d9f4a04e
commit debd2b5839
6 changed files with 19 additions and 43 deletions

View file

@ -61,3 +61,15 @@ pub type ComponentRefPin<'a> = core::pin::Pin<abi::datastructures::ComponentRef<
pub mod eventloop;
mod item_rendering;
/// One need to use at least one function in each module in order to get them
/// exported in the final binary.
/// This only use functions from modules which are not otherwise used.
#[doc(hidden)]
#[cold]
pub fn use_modules() -> 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
}