With jemalloc the page size is a compile time constant that results in
the process aborting on memory allocation if the compile time determined
page size does not match the kernel reported page size at run-time.
When we, or our users, compile the above programs for aarch64-linux,
there is a fair expectation that the resulting binary works on any
aarch64-linux system. As we can't determine the target page size
reliably, disable jemalloc.
Fixes#8134
Commit cd6f2e2 reformated the .toml, but the 80 char width column is
judged too small to be practical
Add a .taplo.toml file
Also do not split feature array
... using taplo with default settings
I tried this with 4 spaces indentation, but the patch is almost as
big as this one, so I went with default settings instead as that
is just easier:-)
Enable the SDF feature by default in our compiler binaries
(Still disabled by default for other users because it takes up compile
time for something they probably don't need)
This is a hacky approach, but does help a lot with the tedious fixes.
See https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or
```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::unnecessary_map_or
cargo fmt --all
```
* optimize: use jemalloc for slint-viewer
The lots of allocations are slowing down slint-viewer.
By using the faster jemalloc, we get a significant time boost
on Linux at least, where I can observe a 15% time reduction:
Before:
```
Time (mean ± σ): 936.6 ms ± 13.5 ms [User: 688.8 ms, System: 191.1 ms]
Range (min … max): 918.9 ms … 955.6 ms 10 runs
```
After:
```
Time (mean ± σ): 794.8 ms ± 16.2 ms [User: 645.4 ms, System: 99.2 ms]
Range (min … max): 755.0 ms … 810.7 ms 10 runs
```
* optimize: also use jemalloc for slint-compiler
As with the slint-viewer, we can observe a drastic time improvement
of around 13% when using jemalloc for slint-compiler:
Before:
```
Time (mean ± σ): 772.8 ms ± 9.2 ms [User: 633.5 ms, System: 136.5 ms]
Range (min … max): 763.3 ms … 787.8 ms 10 runs
```
After:
```
Time (mean ± σ): 672.5 ms ± 13.5 ms [User: 610.4 ms, System: 60.1 ms]
Range (min … max): 655.1 ms … 700.7 ms 10 runs
```
* optimize: also use jemalloc for slint-lsp
The impact here was not measured, but it should be in a similar
ballpark to the slint-compiler and slint-viewer, and thus quite
noticeable in practice.
The `SLINT_EMIT_DEBUG_INFO` environment variable needs to be set for Rust and C++ builds. For the interpreter it's always enabled, since ... we have it.
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
This moves most of the version information we need to update into one
place.
Note that the workplace dependency features are in *addition* to any
feature set when using the workspace dependency. So we have all
workspace dependencies defined with `no-default-features = true`.
two bugs:
- If the .slint file did not contain any import, the depfile would have
no dependencies, and as a result, ninja would consider that it is
always dirty.
- In case the binary dir is a sub directory, the dependencies were
relative to the wrong directory. Thgis is because the behavior
changed in some version of cmake (see https://cmake.org/cmake/help/latest/policy/CMP0116.html)
to avoid any problem, use the absolute paths
Fixes#3261
We aldready document in cmake.md that a valid value for
`SLINT_EMBED_RESOURCES` is `embed-for-software-renderer`, but this
doesn't work since it expect a `software-renderer` feature that don't
exist. So create this feature.
This feature brings on all the image and font loading machinery in the
compiler. But I still enable it by default since it is a documented
cmake option.
For Ninja builds we instruct the compiler to generate a dependency file.
This would include paths like builtin:/native/../common/slint-logo-light.svg,
which my version of Ninja on Windows doesn't like at all and just flat out aborts on.
It doesn't make sense for us to emit those as dependencies, so this patch excludes
builtin paths.