This adds a `unstable-wgpu-24` feature that exposes WGPU types in the
GraphicsAPI enum, adds `require_wgpu_24()` to the backend selector,
and adds a conversion from `wgpu::Texture` to `slint::Image`.
The `require_wgpu_24()` function in the selector will be extended in the
future (before the next release) to permit specifying additional aspects
of the WGPU configuration.
Co-Authored-By: Olivier Goffart <olivier.goffart@slint.dev>
I found `mise` a tool to help manage development projects.
https://mise.jdx.dev/
It basically can manage ENV vars based on the directory you are in,
manages tools you need (and makes thoser available based on the
directory you are in), and allows to define simple tasks that can
then be shared between developers.
Tools can be found in npm, pipx, aqua, binaries on github, ...
and it tries to verify signatures and all that (if supported by the
repo the data comes from).
I replaces the entire autofix workflow with mise tooling and tasks,
just to give it a try :-)
To reproduce:
```sh
> cargo install mise # to get the tool itself
# Follow the necessary step
# https://mise.jdx.dev/installing-mise.html#shells
# to intergate into your shell
> cd /your/slint/folder
# Mise will now ask whether or not to trust this dir and prints the
# command needed to do so. Run that.
> mise install # Install all the tools defined in .mise/config.toml
# Add a .mise.local.toml with local overrides. Git will ignore this file.
# Or add tasks into .mise/tasks/local ... Git will also ignore those.
> mise run 'ci:autofix:**:all' # To run all the ci:autofix tasks.
```
It is so much fatser to see these checks fail locally than it is to
bother CI with them :-)
* vscode: Fix tmGrammar test
We can not have a copyright header in the test files,
they must start with the SYNTAX TEST annotation in
the first bytes.
* Update REUSE.toml
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
---------
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
The CI has been using the deprecated vsce package to test .vsix creation, while it was renamed to @vscode/vsce a while ago. Last night, the vsce publish action we're using switched to @vscode/vsce and now the vsce build is failing, because of a bug that was hidden:
In vsce 2.25 support for `files` in `package.json` was introduced, which was just `bin/slint-lsp-*` in our package. That would omit the extension entry point and many other files, causing the vsce package creation step to fail.
Fix this by fixing the CI to use the same vsce version as the action is using, and replace the files with the default and the ignore setting of files we definitely want to exclude from the package.
With this, the package now contains these files:
```
slint-1.10.0.vsix
├─ [Content_Types].xml
├─ extension.vsixmanifest
└─ extension/
├─ .gitignore [0.03 KB]
├─ LICENSE.txt [0.04 KB]
├─ biome.json [0.2 KB]
├─ esbuild.js [2.22 KB]
├─ extension-logo.png [6.76 KB]
├─ language-configuration.json [1.49 KB]
├─ package.json [7.93 KB]
├─ readme.md [3.85 KB]
├─ slint-file-icon.svg [0.83 KB]
├─ slint.injection.json [1.61 KB]
├─ slint.markdown-injection.json [1.37 KB]
├─ slint.tmLanguage.json [8.79 KB]
├─ telemetry.json [2.21 KB]
├─ bin/
│ └─ slint-lsp [82.21 MB]
├─ out/
│ ├─ .gitignore [0 KB]
│ ├─ browser.js [321.26 KB]
│ ├─ browser.js.map [406.49 KB]
│ ├─ browserServerMain.js [18.27 MB]
│ ├─ browserServerMain.js.map [255.8 KB]
│ ├─ extension.js [457.78 KB]
│ ├─ extension.js.map [617.27 KB]
│ ├─ slint_lsp_wasm.js [84.62 KB]
│ └─ slint_lsp_wasm_bg.wasm [13.56 MB]
├─ snippets/
│ └─ slint.json [0.53 KB]
└─ static/
└─ walkthroughs/
└─ welcome/ (4 files) [17.1 KB]
```
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.
See https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_return
cargo fmt --all
```
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.
See https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_lifetimes
cargo fmt --all
```
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.
See https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrow
```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_borrow
cargo fmt --all
```
This is a hacky approach, but does help a lot with the tedious fixes.
See https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or
```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::unnecessary_map_or
cargo fmt --all
```
A Figma plugin is just a single javascript file which means no out of the box way to split files, import helper libraries and scale the project. It's also a vanilla web site for making the UI.
The PR updates the project to use Vite. It allows normal project spliting for typescript and css files. It provides a simpler way for the plugin and backend code to communicate. React is used to then build the plugin interface.
Update from reuse 2 as packaged by Ubuntu to reuse 5
from pypi.
This moves configuration from .reuse/dep5 into REUSE.toml.
Make sure to only have one entry per license with all
the file under that license in one place.
This does change some licenses in demos and examples from
our triple-license to MIT. I *think* those were meant to
be under MIT all along as all docs and examples are supposed
to be MIT.
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.
Removed unused images.
Sets NPM versions to exact version e.g 8.2.1, not ^8.0.0. (prepare for dependabot).
Update all dependencies.
Use npm clean-install instead of npm install. This means an up to date package-lock.json file must exist in the project. Ensuring local development and the CI are repeatable builds that use the same dependency packages.
The Zephyr VERSION file is excluded as this simply specifies the version
of the Zephyr applicaiton, and the documentation doesn't say how
comments should be specified or if they are supported.
This might bring in a newer version of clang-format. We don't need to install `clang-format` as GH sets up /usr/bin/clang-format according to their toolset.json file.
Code is generated from grammar.js, which gets built into a library. That
library gets loaded by a text editor. So someone might argue that the GPL might
infect that text editor.
We do not want that argument to come up, so let's use MIT for that code.
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.