The ImageCacheKey enum has a gap when not targeting wasm:
```
pub enum ImageCacheKey {
/// This variant indicates that no image cache key can be created for the image.
/// For example this is the case for programmatically created images.
Invalid,
/// The image is identified by its path on the file system.
Path(SharedString),
/// The image is identified by a URL.
#[cfg(target_arch = "wasm32")]
URL(SharedString),
/// The image is identified by the static address of its encoded data.
EmbeddedData(usize),
}
```
In the C++ generated header, that cfg was not mapped, and thus the URL
variant was always there, while in a regular slint-cpp build it's not.
Consequently tag value 2 in Rust was used to represent the EmbeddedData
variant, while in the C++ generated code that become variant 3 and 2 was
interpreted as a URL. So the receiving code in C++ tried to interpret
the cache key as URL variant, while Rust created it as EmbeddedData.
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
We have plenty of command lines that explicitly use `-GNinja`, so let's
make Ninja a tool that is required. That's easier than changing all the
command lines to have two variants (use XX or YY if you have Ninja
installed), and we know that the dependency handling works best with
Ninja.
Fixes#2495
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
Amend 8406e1050d by fixing the condition
to apply the install_name when the cache variable used to detect package
builds is defined, not _not_ defined.
cc #2075
Set install_name to include rpath as per commit
916b927f4f only when doing top-level
builds that are meant to be installed via "make install".
cc #2075
Thanks to @jschwe, there's a way to instruct corrosion to supply link
flags that set the install name and work around cargo/rustc behavior.
In exchange, now that we're using rpath, to be able to continue to run
the tests and examples against a build tree, we need to set
CMAKE_BUILD_RPATH.
Fixes#2075
Having a const generic for that didn't turn to be a good API.
Also made the C++ side more difficult
(Also renamed buffer_stride to pixel_stride)
Closes#2135
For node and cpp, I use relative links to point to the slint language
reference documentation.
For the slint crate documentation I create a link to
https://slint-ui.com/releases/VERSION/... instead: This needs to work from
docs.rs as well as from our own docs area on slint-ui.com! That is
pretty ugly: I can not even define constants for this as the crate docs
need to come before anything else.