This removes a lot of allocations and speeds up the compiler step
a bit. Sadly, this patch is very invasive as it touches a lot of
files. That said, each individual hunk is pretty trivial.
For a non-trivial real-world example, the impact is significant,
we get rid of ~29% of all allocations and improve the runtime by
about 4.8% (measured until the viewer loop would start).
Before:
```
Benchmark 1: ./target/release/slint-viewer ../slint-perf/app.slint
Time (mean ± σ): 664.2 ms ± 6.7 ms [User: 589.2 ms, System: 74.0 ms]
Range (min … max): 659.0 ms … 682.4 ms 10 runs
allocations: 4886888
temporary allocations: 857508
```
After:
```
Benchmark 1: ./target/release/slint-viewer ../slint-perf/app.slint
Time (mean ± σ): 639.5 ms ± 17.8 ms [User: 556.9 ms, System: 76.2 ms]
Range (min … max): 621.4 ms … 666.5 ms 10 runs
allocations: 3544318
temporary allocations: 495685
```
Replaces the use of NPM with PNPM. This should make it quick and easy to update any of the dependencies as dependabot will now see everything in one go.
As a drive-by, this introduces a macro that allows for explicit logging to console.error (which goes to stderr). This is something we should gradually start using, as it allows for capturing on the Node.js side (by the user or our tests).
Puts a shared biome.json in the root.
Deletes the prettier config files.
Deletes the unused pre-commit hooks.
Applies biome linting and formatting to the slintpad project.
* Use vscode ext lint and format also for api/node
* Re-use biome config file from VS code instead of duplicating it
* Remove package-lock.json again
* Don't bother running the biome formatter on Windows
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
before
```
error: Uncaught (in promise) Error: Could not compile ui/appwindow.slint
at loadSlint (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:464:19)
at Module.loadFile (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:644:12)
at file:///home/mrcool/dev/deno/lab/memory/src/main.ts:3:23
```
after
```
error: Uncaught (in promise) Error: Could not compile ui/appwindow.slint
Diagnostics:
[ui/appwindow.slint:4:5] Unknown type MemoryTile
at loadSlint (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:468:19)
at Module.loadFile (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:648:12)
at file:///home/mrcool/dev/deno/lab/memory/src/main.ts:3:23
```
* Examples for calling public functions in language-specific docs.
* Update the function example so it actually uses its parameter.
(This broke some c++ tests because of the unused argument warning)
After the Rust 1.78 release, napi-rs panics on zero-sized array buffers.
Work around it by not allocating a zero-sized array buffer for this specific test.
Upstream PR: napi-rs/napi-rs#2083
Add the ability to depend on the testing backend and opt into it
when running tests/cases, like we do for the other drivers.
The testing backend dependency is removed in the packaging step, as
we don't publish i-slint-backend-testing.
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"