mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Remove extern "C" functions from wasm module
We don't need these functions and their export. They account for ~20kb in the optimized .wasm - plus JS glue code.
This commit is contained in:
parent
3d7eb6ac70
commit
f087cc18bc
16 changed files with 18 additions and 1 deletions
|
@ -69,6 +69,7 @@ pub use default_backend::{
|
|||
|
||||
#[doc(hidden)]
|
||||
#[cold]
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn use_modules() {
|
||||
default_backend::use_modules();
|
||||
#[cfg(feature = "sixtyfps-rendering-backend-qt")]
|
||||
|
@ -77,6 +78,7 @@ pub fn use_modules() {
|
|||
sixtyfps_rendering_backend_gl::use_modules();
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub mod ffi {
|
||||
use sixtyfps_corelib::window::ffi::ComponentWindowOpaque;
|
||||
use sixtyfps_corelib::window::ComponentWindow;
|
||||
|
|
|
@ -1399,6 +1399,7 @@ pub fn create_gl_window_with_canvas_id(canvas_id: String) -> ComponentWindow {
|
|||
|
||||
#[doc(hidden)]
|
||||
#[cold]
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn use_modules() {
|
||||
sixtyfps_corelib::use_modules();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ mod key_generated;
|
|||
|
||||
#[doc(hidden)]
|
||||
#[cold]
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn use_modules() -> usize {
|
||||
sixtyfps_corelib::use_modules() + {
|
||||
#[cfg(no_qt)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue