Skip to content

Merge master into feature/winit-0.31#12153

Open
Murmele wants to merge 127 commits into
slint-ui:feature/winit-0.31from
Murmele:feature/winit-0.31
Open

Merge master into feature/winit-0.31#12153
Murmele wants to merge 127 commits into
slint-ui:feature/winit-0.31from
Murmele:feature/winit-0.31

Conversation

@Murmele

@Murmele Murmele commented Jun 18, 2026

Copy link
Copy Markdown
Member

No description provided.

tronical and others added 30 commits June 10, 2026 18:20
…CI (slint-ui#12037)

The nightly failed to sign the slint-viewer AAB because the key alias was guessed as "androidkey". The alias now comes from the new ANDROID_KEYSTORE_ALIAS secret, 
and the keystore password also unlocks the key, like the APK signing already does.

The rest cleans up the Android part of the nightly:
  - Cache cargo-ndk and resvg instead of compiling them on every run
  - Build slint-viewer only once: the nightly APK is now extracted from the AAB with bundletool
  - Drop the WiFi multicast permission; nothing uses it
  - Let an InsetDrawable in ic_launcher.xml pad the adaptive icon, instead of assembling a padded SVG with sed
Match clap's standard behavior so all argument errors (whether reported
by clap or by the explicit conflict checks in main) share one exit code.
Tighten the existing integration tests to assert the exact exit code
rather than just "non-zero".
Compile the .slint file, print any diagnostics in the compiler's own
format, and exit without opening a window. Exit status 1 if there are
any errors, 0 otherwise (warnings still print).

Useful for scripts and AI agents that want fast static validation
without launching the LSP or running a full `cargo build`.
Emit compiler diagnostics as a JSON array on stdout so agents and
tooling can consume them without scraping the colored text output.
The schema is a flat array of {file, line, column, end_line, end_column,
level, message}, 1-indexed to match the human format. Honored by
--check and the regular run/screenshot paths.

Reject the combos that also want stdout (exit code 2 like other
argument errors):
* --diagnostics-format json + --screenshot -
* --diagnostics-format json + --save-data -
* --diagnostics-format json + --auto-reload (live-preview prints its own)

Switch --screenshot's compile-failure exit code from -1 to 1, matching
--check. The plain run path keeps its documented -1 behavior.

Add the slint_nightly_test cfg-attr trick so a future DiagnosticLevel
variant is caught at lint time; unknown levels serialize as "unknown".
Today the MCP server's `take_screenshot` tool needs a real display                                                                                    
because the testing backend (where the MCP server lives) has a stub
renderer.

This PR embeds a software rasterizer in the testing backend so
`take_screenshot` returns a real PNG of the running app, with no
display, Xvfb, or GPU.

Set `SLINT_BACKEND=headless` to opt in.

```
SLINT_EMIT_DEBUG_INFO=1 SLINT_MCP_PORT=9315 SLINT_BACKEND=headless \                                                                                  
    cargo run --features slint/mcp
```
Remove repositories that were deleted, comment out projects that are
broken for reasons unrelated to Slint, and fix the sub_path of projects
that were restructured.

Add an extra_commands matrix key to run custom commands instead of
plain cargo update (pin a dependency, fix up a manifest, set RUSTFLAGS),
and a toolchain key for projects that need nightly.

Add missing system packages for several jobs, and add new projects
using Slint found on github.
)

Replace the monolithic SKILL.md with a short entry point that points
to on-demand reference files for language and layout, gotchas, events
and overlays, drawing and theming, interop, and debugging/MCP, plus a
setup.md and a tools-install.md covering slint-lsp and slint-viewer.
The assistant loads only the relevant file on demand.

Every .slint snippet now passes tests/doctests so the snippets stay
in sync with the language.
The doctests driver compiles fenced slint snippets in skills/ too, and
the icon fragment failed: the driver's wrapper does not import Palette.
Show complete files with the std-widgets import instead — also better
for copying. The theme snippet has the same hole but an indented fence,
which the driver does not scan.
Every docs page serves a .md sibling so AI agents can read the docs
without parsing HTML. But that endpoint serves the unprocessed MDX,
and many pages pull their code examples from files via Vite ?raw
imports rendered by <Code>. Agents reading such a page got the prose
but an import statement where the HTML shows code.

Resolve those imports when rendering the markdown response and inline
the file content as a fenced code block, mirroring extractLines() for
line ranges. Unresolvable imports stay untouched so build validation
still catches mistakes.
The windows-latest runner image now ships Visual Studio 18 (2026) with
MSVC 14.51, whose STL headers statically assert that any Clang parsing
them is version 20 or newer. The unconditional LLVM 19.1.7 downgrade
from commit 4823ffa therefore made bindgen fail in the mozangle
build of the servo example:

    yvals_core.h:533:58: error: static assertion failed: error STL1000:
    Unexpected compiler version, expected Clang 20 or newer.

The downgrade is still needed on windows-2022 runners: VS 2022 bundles
clang 19, and a newer libclang fails to parse its resource headers
because the MMX builtins used by mmintrin.h were removed in clang 20:

    VC\Tools\Llvm\x64\lib\clang\19\include\mmintrin.h:56:19:
    error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'

(This only shows when the skia-bindings prebuilt binary download misses
and it builds from source, e.g. in the nightly cargo-update job right
after a skia-bindings release.)

So key the downgrade on ImageOS=win22: LLVM 19.1.7 there to match the
VS-bundled clang, the image's preinstalled LLVM (currently 22.1.2)
everywhere else.
The scanner only matched fences at the start of a line, so slint
snippets indented inside list items were never tested. Scan line by
line, strip the fence's indentation from the snippet, and use the
exact fence line in the test name (skipped snippets used to shift it).

Newly scanned snippets that don't compile: mark the illustrative
fragments in the figma-inspector guide and the servo README as no-test
(they import generated files that don't exist in the repo), and export
a component from the skill's theme snippet (a file exporting only a
global hits a deprecation fallback).

Also import Palette in the snippet wrapper so fragments can use
palette colors, and include skills/ in the docs_build path filter so
the doctests run when the skill files change.
It should look exactly the same in its default size,
but no longer totally ugly when resized.
Use the branding and make it clearer how to connect a device.

---------

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
Add a mcp feature to the Slint's C++ and update the skill to reflect that
Otherwise loading a reasonably complex SVG will cause a long delay.
The name "inner shadow" is what most graphical editors use and is
easier to recognize than CSS's "inset". The properties are not yet
released, so no deprecation is needed. The docs now show how the CSS
box-shadow shorthand maps to the Slint properties.

Fixes: slint-ui#12055
…nt-ui#12029)

Make the existing undo/redo implementation callable from Slint DSL,
matching the already-public copy(), cut(), paste(), and select-all().
This enables custom context menus with Undo/Redo support.
AFAICS this brings in the iOS adapter for the first time.
…12052)

New members on builtin elements broke code that already declared a
property or callback with the same name (in 1.17: `minimized`,
`maximized`, `close()`, and `hide()` on Window).

Members marked `//-shadowable` in builtins.slint can now be shadowed by
a local declaration: the conflict is a warning instead of an error and
the declaration shadows the builtin member, even with a different type.

Shadowing stays an error when a base component uses the builtin member,
because inlining merges the base's root element into the inheriting
element and the base's by-name references would silently resolve to the
shadowing declaration.

Shadowable members must not be otherwise accessed by name in the
compiler, as such accesses would also resolve to the shadowing
declaration. An assert in load_builtins enforces this for default
bindings.
This should allow us to implement a separate file watcher for the LSP.
The LSP currently can't reconcile watched paths, so it doesn't
notice if a directory is deleted or renamed because it does not have the
directory itself listed as a file in the document cache.
This gives the LSP access to the reconcile logic of the file system
watcher.

E.g. If a directory is renamed, VS Code will just send a delete and
create event for the directory, not the underlying files.
The FileWatcher in the interpreter can deal with this kind of events and
synthesizes any necessary events.

Closes slint-ui#11778
This ensures that adding our own file watcher reconciliation to the
language server does not degrade if the list of watched files is
for any reason not exhaustive.
This allows detecting changes, especially to the filewatch path
without having to recreate the watch set.
It turns out that at least Visual Studio Code does not clear diagnostics
for deleted files, so we must clear those diagnostics manually if we
notice the file is deleted.
Rename EmptyWindow to RemoteViewerWindow and add a RemoteViewerState
enum property so the .slint UI can tell whether the viewer is waiting
for a connection, connected, previewing, or showing a preview error.
Send a proper WebSocket close handshake when the LSP disconnects or
replaces a connection, log a connection reset without close handshake
as a normal end of session, and don't warn about a second connection
when the previous session already ended.
LeonMatthes and others added 23 commits June 16, 2026 11:55
Comments are now broken up into line comment and block comment nodes.
This will allow us to format them potentially differently.

Export statements now also enclose their exporting definition.

Changed events are now added as a separate grammar construct.

@rust-attr nodes are now properly parsed.
previously the following would produce errors because it the because
tree-sitter tried to parse it as a changed_event and not a callback_event:

component Test {
    changed => {
    }
    changed(test) => {
    }
    changed value => {
    }
}

With this fix the first two instances are correctly parsed as callback
events and only the last one is parsed as a changed event.
The state's grammar in Tree-sitter was somewhat convoluted because it
would break the state's label itself as well as all state definitions
into a single syntax node.

by breaking this up into a surround states_definition with inner
state_definition nodes we can more easily format the states.
The Tree-sitter grammar for structs previously contained no named nodes
for the individual fields which is annoying to work with in Tree-sitter
queries.
Now, each field is a named node with a member for the name and the type.
Otherwise, the compiler is complaining that these parameters are not
used.
Luckily, Tree-sitter already defines an UNUSED macro.
The tree-sitter test command expects the tests to be placed in
test/corpus, not just corpus/
Before the Tree-sitter CI run did not actually test anything.

The corpus was generated into the wrong subfolder, so the Tree-sitter
test command did not pick it up.

This now also adds a shell script to regenerate all generated test cases
and run the Tree-sitter tests, which is useful to run them locally.

Note that this commit is expected to fail CI, because the Tree-sitter
grammar cannot parse every test at the moment.
These are generated files and should not be formatted, as this creates
unnecessary commit noise.
This was introduced recently, but not added to the tree-sitter grammar
This raised another issue that the Tree-sitter grammar could not parse
two subsequent `;`
This is probably not needed, but could catch changes in behavior by the
tree-sitter CLI.
* Add support for gradient radius/center
* Add support for "enabled" animation property
…int-ui#12126)

When inlining a component, the element references stored in the
repeated-row cells of a GridLayout were not remapped to the inlined
copies, leading to a panic when computing the layout info.

Fixes: slint-ui#12123
@Murmele Murmele changed the title Feature/winit 0.31 Merge master into feature/winit-0.31 Jun 18, 2026
@Murmele Murmele force-pushed the feature/winit-0.31 branch from 88a34c8 to 0de2d88 Compare June 19, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.