Following the recent changes in #4765, the library name was updated from printerdemo to printerdemo_lib. This modification has inadvertently affected the naming of the JavaScript file generated by wasm-pack, leading to printerdemo.js being renamed to printerdemo_lib.js. Consequently, the existing reference in the index.html file became outdated, causing the WASM module to fail to load correctly.
This PR addresses the issue by updating the reference in index.html, ensuring that the page can properly load and execute the WASM module.
This reverts commit 060f63ad56, as it broke the C++ interpreted demo and makes it impossible to implement the demo "fully" in JavaScript and Python.
cc #4777
```
warning: output filename collision.
The bin target `printerdemo` in package `printerdemo v1.5.0 (C:\dev\slint\examples\printerdemo\rust)` has the same output filename as the lib target `printerdemo` in package `printerdemo v1.5.0 (C:\dev\slint\examples\printerdemo\rust)`.
Colliding filename is: C:\dev\slint\target\debug\deps\printerdemo.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
```
Note that the trick to use the same file for both was not ideal because
it produces a warning and would compile it twice if it was by default.
So just make both a lib.rs and a main.rs
Following the winit 0.29 merge, a few adjustments are in order:
- Make slint::Window.set_size() before show keep the size
- on wasm, attempt to keep the size of the canvas from CSS
- on wasm, one must set the width and height explicitly on the canvas
otherwise there is wierd scaling
- on wasm, we can't set None as maximum or minimum size otherwise winit
panics
- It seems that the hack we had to keep the size in range is no longer
necessary
- The hack in the slide puzzle can be removed. (but unfortunately it
doesn't follow resizes
Unfortunatelly we always call set_inner_size to avoid infinite loop when
the css properties are not specificed, so this will override layouts
Also we don't default anymore to the preferred size
* Update internal/backends/winit/winitwindowadapter.rs
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
* Add MCU board config setup
Let the mcu backend provide the link flags via I_DEP_* and the
Slint-build crate now offers a function to allow printing Slint-specific
rustc flags.