Having to make sure the right version of npm is installed is a hassle
for people that just want to try out slint for the first time. The
proposed way to disable node support enables basically everything else,
which opens another can of worms when Windows tries to build MCU
support.
So do not build Node.JS as part of the default build anymore, but
document how to build it.
The CI should build with `--workspace` already, so there should be no
need to change the CI build.
This is only required for dependencies of slint-build and xtask.
So this is not enforced yet and will still work with 1.56 with
for C++ or when not using slint-build.
Move the explanation of using two-way bindings to expose globals further
down.
Before that, provide inline examples with Rust and C++ how to access the
globals directly.
For some reason, The cargo test for the cpp driver test puts the
libslint_cpp.so library in the `deps` foilder, in addition to the
cdynlib which is generated in the normal target folder. So we end
up with two .so.
We need to have the cpp lib as a dependency because its metadata give us the
metadata on where to find the headers.
Ideally it should be an artifact dependency but this is not yet existing
Since cargo sets the LD_LIBRARY_PATH or the PATH env variable when
running the test, running the runtime built binaries work by taking
the library that is in the deps folder.
cbindgen 0.21 was released which contains https://github.com/eqrion/cbindgen/pull/724
which allow to use raw identifier in enums shared with C++.
So now we can have `MouseCursor.move` in slint despite it being a rust keyword
Note that the strum macro also have trouble with the raw identifier, so we
take that in account in the conversion functions in the interpreter
This is the beginning of a page to collect common things users need to
do, in a format that they can copy & paste into their application code.
There's a lot more that could be done though.
After commit 079a8a75d6 some previews
started having default 1024x768 winit sizes, which breaks.
Instead, assign preferred sizes and Window elements to all enabled
previews, and disable some where it doesn't make sense.
Highlight all Slint code and don't do the preview on snippets where it
doesn't make sense.
Some snippets, such as the bare statement or expression snippets, are
now highlighted, but they are continued to be excluded from the doctest.
Don't fix the canvas to 100/100 physical pixels, as not all examples fit into that. Instead
let the GL backend resize according to constraints,
and add some missing sizes to some examples.