mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Fix linking of the interpreter
I don't know why, byt the 'crate-type = "lib"' seem to fix the problem
This commit is contained in:
parent
9e66ec71ce
commit
6e9d4f9e8d
4 changed files with 5 additions and 12 deletions
|
@ -11,7 +11,7 @@ publish = false
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["lib", "cdylib"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# In the future, this shouldn't be a default feature, but should be enabled by cmake
|
# In the future, this shouldn't be a default feature, but should be enabled by cmake
|
||||||
|
|
|
@ -11,7 +11,7 @@ LICENSE END */
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[cold]
|
#[cold]
|
||||||
pub extern "C" fn use_modules() -> usize {
|
pub fn use_modules() -> usize {
|
||||||
#[cfg(feature = "sixtyfps-interpreter")]
|
#[cfg(feature = "sixtyfps-interpreter")]
|
||||||
sixtyfps_interpreter::use_modules();
|
sixtyfps_interpreter::use_modules();
|
||||||
sixtyfps_rendering_backend_default::use_modules();
|
sixtyfps_rendering_backend_default::use_modules();
|
||||||
|
|
|
@ -740,7 +740,7 @@ pub mod testing {
|
||||||
|
|
||||||
#[cfg(feature = "ffi")]
|
#[cfg(feature = "ffi")]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub mod ffi {
|
pub(crate) mod ffi {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
|
|
@ -107,14 +107,7 @@ pub use sixtyfps_corelib::{Brush, Color, SharedString, SharedVector};
|
||||||
/// This only use functions from modules which are not otherwise used.
|
/// This only use functions from modules which are not otherwise used.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[cold]
|
#[cold]
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
|
||||||
pub fn use_modules() -> usize {
|
|
||||||
#[cfg(feature = "ffi")]
|
#[cfg(feature = "ffi")]
|
||||||
{
|
pub fn use_modules() -> usize {
|
||||||
crate::api::ffi::sixtyfps_interpreter_value_new as usize
|
crate::api::ffi::sixtyfps_interpreter_value_new as usize
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "ffi"))]
|
|
||||||
{
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue