Skip to content

Commit 81d7286

Browse files
committed
Merge branch 'master' into librepcb-patches
2 parents 662f8b8 + edf9800 commit 81d7286

429 files changed

Lines changed: 15670 additions & 8116 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/nightly_snapshot.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ jobs:
295295
with:
296296
pat: ${{ secrets.VSCODE_MARKETPLACE_PAT }}
297297
registryUrl: https://marketplace.visualstudio.com
298-
dryRun: ${{ github.event.inputs.private == 'true' || (github.ref != 'refs/heads/master' && github.event.inputs.release != 'true') }}
298+
dryRun: ${{ github.event.inputs.private == 'true' || (github.ref != 'refs/heads/pre-release/1.16' && github.event.inputs.release != 'true') }}
299299
packagePath: editors/vscode
300300
dependencies: false
301301
- name: Publish to Open VSX Registry
302302
continue-on-error: true
303-
if: ${{ github.event.inputs.private != 'true' && (github.ref == 'refs/heads/master' || github.event.inputs.release == 'true') }}
303+
if: ${{ github.event.inputs.private != 'true' && (github.ref == 'refs/heads/pre-release/1.16' || github.event.inputs.release == 'true') }}
304304
uses: HaaLeo/publish-vscode-extension@v2
305305
with:
306306
pat: ${{ secrets.OPENVSX_PAT }}
@@ -671,7 +671,7 @@ jobs:
671671
tag: v${{ steps.version.outputs.VERSION }}
672672
commit: ${{ github.sha }}
673673
- uses: ncipollo/release-action@v1
674-
if: github.event.inputs.release != 'true' && github.ref == 'refs/heads/master'
674+
if: github.event.inputs.release != 'true' && github.ref == 'refs/heads/pre-release/1.16'
675675
with:
676676
allowUpdates: true
677677
prerelease: true
@@ -706,6 +706,7 @@ jobs:
706706
- os: ubuntu-22.04
707707
name: "Ubuntu 22.04 1.92"
708708
rust_version: "1.92"
709+
# plotter is excluded because with --all-features, its dependency cause build error because of fontconfig's dlopen feature
709710
extra_args: "--exclude plotter"
710711
- os: windows-2022
711712
name: "Windows 2022 nightly"
@@ -714,7 +715,8 @@ jobs:
714715
- os: macos-14
715716
name: "MacOS 14 nightly"
716717
rust_version: "nightly"
717-
extra_args: "--exclude ffmpeg --exclude gstreamer-player"
718+
# plotter is excluded because its dependency doesn't build with Nightly rust: https://github.com/servo/pathfinder/issues/584
719+
extra_args: "--exclude ffmpeg --exclude gstreamer-player --exclude plotter"
718720
uses: ./.github/workflows/build_and_test_reusable.yaml
719721
with:
720722
os: ${{ matrix.os }}

.github/workflows/nightly_tests.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,18 @@ jobs:
163163
- run: brew install xcodegen
164164
- run: xcodegen -s ios-project.yml
165165
working-directory: ${{ matrix.demo }}
166-
- name: "Find Simulator UDID from iOS 26.0 runtime"
166+
- name: "Find Simulator UDID from iOS 26.4 runtime"
167167
run: |
168-
echo "=== Finding device from iOS 26.0 runtime (default Xcode) ==="
169-
# Find the device UDID from iOS 26.0 runtime to avoid ambiguity
168+
echo "=== Finding device from iOS 26.4 runtime (default Xcode) ==="
169+
# Find the device UDID from iOS 26.4 runtime to avoid ambiguity
170170
# Multiple runtimes have devices with the same name, so we need the specific one
171171
# Output format: " Device Name (UDID) (Shutdown)"
172-
DEVICE_LINE=$(xcrun simctl list devices available | grep -A 50 "iOS 26.0" | grep "${{ matrix.device }}" | head -n 1)
172+
DEVICE_LINE=$(xcrun simctl list devices available | grep -A 50 "iOS 26.4" | grep "${{ matrix.device }}" | head -n 1)
173173
174174
if [ -z "$DEVICE_LINE" ]; then
175-
echo "ERROR: Could not find ${{ matrix.device }} in iOS 26.0 runtime"
176-
echo "Available iOS 26.0 devices:"
177-
xcrun simctl list devices available | grep -A 30 "iOS 26.0"
175+
echo "ERROR: Could not find ${{ matrix.device }} in iOS 26.4 runtime"
176+
echo "Available iOS 26.4 devices:"
177+
xcrun simctl list devices available | grep -A 30 "iOS 26.4"
178178
exit 1
179179
fi
180180

.github/workflows/publish_npm_package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- os: ubuntu-22.04-arm
6666
rust-target: aarch64-unknown-linux-gnu
6767
napi-rs-target: linux-arm64-gnu
68-
- os: macos-14
68+
- os: macos-26
6969
rust-target: aarch64-apple-darwin
7070
napi-rs-target: darwin-arm64
7171
- os: windows-2022

.github/workflows/schedule_nightly_snapshot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
branch:
18-
- pre-release/1.15
18+
- pre-release/1.16
1919
- master
2020

2121
steps:

.github/workflows/upload_pypi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
taplo get -f Cargo.toml features.default
9797
9898
- name: Build iOS wheels
99-
uses: pypa/cibuildwheel@v3.4.0
99+
uses: pypa/cibuildwheel@v3.4.1
100100
with:
101101
package-dir: api/python/slint
102102
output-dir: wheelhouse

.mise/tasks.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ description = "Run pnpm format:fix"
9191
run = "pnpm type-check:ci"
9292
depends = ["prepare:pnpm-install"]
9393

94+
["lint:ts:knip"]
95+
description = "Run knip"
96+
run = "pnpm knip"
97+
depends = ["prepare:pnpm-install"]
98+
9499
### Build
95100

96101
["build:lsp:wasm"]
@@ -138,4 +143,4 @@ depends = [
138143

139144
["ci:autofix:lint"]
140145
description = "CI autofix job -- lint steps"
141-
depends = ["lint:legal:reuse", "lint:ts:typecheck"]
146+
depends = ["lint:legal:reuse", "lint:ts:typecheck", "lint:ts:knip"]

AGENTS.md

Lines changed: 54 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
This file provides guidance to AI coding assistants when working with code in this repository.
44

5-
## Project Overview
6-
7-
Slint is a declarative GUI toolkit for building native user interfaces across embedded systems, desktops, mobile, and web platforms. UIs are written in `.slint` markup files and connected to business logic in Rust, C++, JavaScript, or Python.
5+
Slint is a declarative GUI toolkit for embedded, desktop, mobile, and web.
6+
UIs are written in `.slint` markup and connected to Rust, C++, JavaScript, or Python business logic.
87

98
## Build Commands
109

1110
### Rust (Primary)
1211
```sh
1312
cargo build # Build the workspace
14-
cargo build --release # Release build (use this flag whenever testing performance)
15-
cargo test # Run tests (requires cargo build first!)
13+
cargo build --release # Release build (use whenever measuring performance)
14+
cargo test # Run tests
1615
cargo build --workspace --exclude uefi-demo # Build all examples
1716
```
1817

@@ -37,22 +36,33 @@ cd api/node && pnpm install
3736

3837
## Testing
3938

40-
**Important**: Run `cargo build` before `cargo test` - the dynamic library must exist first.
39+
Don't run `cargo build` before `cargo test` `cargo test` compiles what it needs.
4140

4241
### Test Drivers
4342
```sh
44-
cargo test -p test-driver-interpreter # Fast interpreter tests
45-
cargo test -p test-driver-rust # Rust API tests
46-
cargo test -p test-driver-cpp # C++ tests (build slint-cpp first)
47-
cargo test -p test-driver-nodejs # Node.js tests
48-
cargo test -p doctests # Documentation snippet tests
43+
cargo test -p test-driver-interpreter # Fastest: interpreter-based
44+
cargo test -p test-driver-rust # Rust API (slow to compile without SLINT_TEST_FILTER)
45+
cargo test -p test-driver-cpp # C++ (build slint-cpp first for the dynamic library)
46+
cargo test -p test-driver-nodejs # Node.js
47+
cargo test -p doctests # Documentation snippets
4948
```
5049

51-
### Filtered Testing
50+
### Filtering .slint Test Cases
51+
52+
The test drivers compile every `.slint` file under `tests/cases/` into a generated Rust test, which is slow.
53+
Set `SLINT_TEST_FILTER=<substring>` to limit the build to matching case files.
54+
5255
```sh
53-
tests/run_tests.sh rust layout # Filter by name
56+
tests/run_tests.sh rust layout # Filter by name via the helper script
5457
```
5558

59+
Only drop the filter for a final full-suite run before committing.
60+
61+
### Writing Slint Test Cases
62+
63+
The `test` property in `tests/cases/*.slint` must be declared `out property<bool> test: ...;`.
64+
Without `out`, the compiler treats it as private and the driver passes the test vacuously.
65+
5666
### Syntax Tests (Compiler Errors)
5767
```sh
5868
cargo test -p i-slint-compiler --features display-diagnostics --test syntax_tests
@@ -89,7 +99,7 @@ SLINT_CREATE_SCREENSHOTS=1 cargo test -p test-driver-screenshots # Generate ref
8999
- `android-activity/` - Android platform support
90100
- `linuxkms/` - Linux KMS/DRM direct rendering
91101
- `selector/` - Runtime backend selection
92-
- `testing/` - Testing backend for automated tests
102+
- `testing/` - Testing backend for automated tests, system testing (protobuf/TCP), and embedded MCP server for AI-assisted UI introspection
93103

94104
- **`internal/renderers/`** - Rendering engines:
95105
- `femtovg/` - OpenGL ES 2.0
@@ -98,31 +108,15 @@ SLINT_CREATE_SCREENSHOTS=1 cargo test -p test-driver-screenshots # Generate ref
98108

99109
### Language APIs (`api/`)
100110

101-
- `rs/slint/` - Rust public crate
102-
- `rs/macros/` - `slint!` procedural macro
103-
- `rs/build/` - Build script support
104-
- `cpp/` - C++ API with CMake integration
105-
- `node/` - Node.js bindings (Neon)
106-
- `python/` - Python bindings (PyO3)
107-
- `wasm-interpreter/` - WebAssembly bindings for browser use
111+
Rust (`rs/slint/`, `rs/macros/` for `slint!`, `rs/build/`), C++ (`cpp/`, CMake), Node.js (`node/`, Neon), Python (`python/`, PyO3), WebAssembly (`wasm-interpreter/`).
108112

109-
### Tools
113+
### Tools (`tools/`)
110114

111-
- `tools/lsp/` - Language Server Protocol for editor integration
112-
- `tools/compiler/` - CLI compiler
113-
- `tools/viewer/` - .slint file viewer with hot reload
114-
- `tools/slintpad/` - Web-based Slint editor/playground
115-
- `tools/figma_import/` - Import designs from Figma
116-
- `tools/tr-extractor/` - Translation string extractor for i18n
117-
- `tools/updater/` - Migration tool for Slint version updates
115+
`lsp/` (LSP server), `compiler/` (CLI), `viewer/` (hot-reload `.slint` viewer), `slintpad/` (web playground), `figma_import/`, `tr-extractor/` (i18n), `updater/` (version migration).
118116

119117
### Editor Support (`editors/`)
120118

121-
- `vscode/` - Visual Studio Code extension
122-
- `zed/` - Zed editor integration
123-
- `kate/` - Kate editor syntax highlighting
124-
- `sublime/` - Sublime Text support
125-
- `tree-sitter-slint/` - Tree-sitter grammar for syntax highlighting
119+
`vscode/`, `zed/`, `kate/`, `sublime/`, `tree-sitter-slint/`.
126120

127121
### Key Patterns
128122

@@ -133,50 +127,39 @@ SLINT_CREATE_SCREENSHOTS=1 cargo test -p test-driver-screenshots # Generate ref
133127

134128
## Version Control (Git)
135129

136-
- The default git branch is `master`
130+
- The default git branch is `master`.
131+
- Prefer linear history — rebase or squash on merge.
137132

138133
## Code Style
139134

140-
- Rust: `rustfmt` enforced in CI
141-
- C++: `clang-format` enforced in CI
142-
- Linear git history preferred (rebase/squash merges)
135+
- Rust: `rustfmt` enforced in CI.
136+
- C++: `clang-format` enforced in CI.
143137

144-
## Platform Prerequisites
138+
### Comments and Docs
145139

146-
### Linux
147-
```sh
148-
# Debian/Ubuntu
149-
sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
150-
libfontconfig-dev libssl-dev clang libavcodec-dev libavformat-dev \
151-
libavutil-dev libavfilter-dev libavdevice-dev libasound2-dev pkg-config
152-
```
140+
- Follow `docs/astro/writing-style-guide.md` when writing *new* comments, doc comments, commit messages, or markdown.
141+
- But don't reformat existing prose to match the style.
153142

154-
### macOS
155-
```sh
156-
xcode-select --install
157-
brew install pkg-config ffmpeg
158-
```
143+
## Platform Prerequisites
159144

160-
### Windows
161-
- Enable symlinks: `git clone -c core.symlinks=true https://github.com/slint-ui/slint`
162-
- Install MSVC Build Tools
163-
- FFMPEG via vcpkg or manual installation
145+
See [`docs/building.md`](docs/building.md) for Linux/macOS/Windows system packages, FFMPEG setup, and the Windows symlink `git clone` flag.
164146

165147
## Deep Dive Documentation
166148

167-
For tasks requiring deeper architectural understanding, see:
168-
169-
- **`docs/development/compiler-internals.md`** - Compiler pipeline, passes, LLR, code generation. Load when working on `internal/compiler/`.
170-
- **`docs/development/type-system.md`** - Type definitions, unit types, type conversions, name resolution, type register. Load when working on `langtype.rs`, `lookup.rs`, or type checking.
171-
- **`docs/development/property-binding-deep-dive.md`** - Reactive property system, dependency tracking, two-way bindings, PropertyTracker, ChangeTracker. Load when working on `internal/core/properties.rs` or debugging binding issues.
172-
- **`docs/development/custom-renderer.md`** - Renderer traits, drawing API, backend integration, testing. Load when working on `internal/renderers/` or fixing drawing bugs.
173-
- **`docs/development/animation-internals.md`** - Animation timing, easing curves, performance, debugging. Load when working on `internal/core/animations.rs` or animation-related issues.
174-
- **`docs/development/layout-system.md`** - Layout solving, constraints, GridLayout/BoxLayout, compile-time lowering. Load when working on `internal/core/layout.rs` or sizing/positioning bugs.
175-
- **`docs/development/python-tests.md`** - Python test infrastructure: pytest tests, Rust test driver, rebuilding slint-python, debugging compilation vs runtime issues. Load when working on Python tests or debugging `test-driver-python` failures.
176-
- **`docs/development/item-tree.md`** - Item tree structure, component instantiation, traversal, focus. Load when working on `internal/core/item_tree.rs`, event handling, or runtime component model.
177-
- **`docs/development/model-repeater-system.md`** - Model trait, VecModel, adapters (map/filter/sort), Repeater, ListView virtualization. Load when working on `internal/core/model.rs` or data binding in `for` loops.
178-
- **`docs/development/input-event-system.md`** - Mouse/touch/keyboard events, event routing, focus management, drag-drop, shortcuts. Load when working on `internal/core/input.rs` or event handling.
179-
- **`docs/development/text-layout.md`** - Text shaping, line breaking, paragraph layout, styled text parsing. Load when working on `internal/core/textlayout/` or text rendering.
180-
- **`docs/development/window-backend-integration.md`** - WindowAdapter trait, Platform trait, WindowEvent, popup management, backend implementations. Load when working on `internal/core/window.rs` or `internal/backends/`.
181-
- **`docs/development/lsp-architecture.md`** - LSP server, code completion, hover, semantic tokens, live preview. Load when working on `tools/lsp/` or IDE tooling.
182-
- **`docs/development/ffi-language-bindings.md`** - C++/Node.js/Python bindings, cbindgen, FFI patterns, adding new cross-language APIs. Load when working on `api/` or internal FFI modules.
149+
Load the relevant file under `docs/development/` when working in the listed area:
150+
151+
- `compiler-internals.md``internal/compiler/`: pipeline, passes, LLR, codegen.
152+
- `type-system.md``langtype.rs`, `lookup.rs`, type checking: unit types, conversions, name resolution, type register.
153+
- `property-binding-deep-dive.md``internal/core/properties.rs`, binding bugs: reactivity, dependency tracking, two-way bindings, PropertyTracker, ChangeTracker.
154+
- `custom-renderer.md``internal/renderers/`, drawing bugs: renderer traits, drawing API, backend integration.
155+
- `animation-internals.md``internal/core/animations.rs`: timing, easing curves, debugging.
156+
- `layout-system.md``internal/core/layout.rs`, sizing bugs: constraints, GridLayout/BoxLayout, compile-time lowering.
157+
- `python-tests.md` — Python tests, `test-driver-python`: pytest setup, rebuilding slint-python, compile vs runtime issues.
158+
- `item-tree.md``internal/core/item_tree.rs`, event handling, component model: item tree, instantiation, traversal, focus.
159+
- `model-repeater-system.md``internal/core/model.rs`, `for` loops: Model trait, VecModel, adapters, Repeater, ListView virtualization.
160+
- `input-event-system.md``internal/core/input.rs`, event handling: routing, focus, drag-drop, shortcuts.
161+
- `text-layout.md``internal/core/textlayout/`, text rendering: shaping, line breaking, styled text.
162+
- `window-backend-integration.md``internal/core/window.rs`, `internal/backends/`: WindowAdapter, Platform, WindowEvent, popups.
163+
- `lsp-architecture.md``tools/lsp/`, IDE tooling: completion, hover, semantic tokens, live preview.
164+
- `mcp-server.md``internal/backends/testing/mcp_server.rs`, `introspection.rs`: shared introspection layer, handle/arena, HTTP transport, adding tools.
165+
- `ffi-language-bindings.md``api/`, internal FFI: cbindgen, FFI patterns, adding cross-language APIs.

0 commit comments

Comments
 (0)