From d97e84faadce990d9a9e836585d9085a60c3ed60 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Fri, 20 Nov 2026 22:12:00 +0900 Subject: [PATCH 1/2] mcpplibs.mwrap.slint + mcpplibs.slintgen 1.19.0: slint-m (Slint as C++23 modules, and the build rule mcpp.plugins.slint) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Descriptors for slint-m mwrap-1.19.0 (GLOBAL, and CN mcpp-res/mwrap-slint, same bytes, sha256 f75b8fb3…): the wrapper, and the rule package in the archive's rules/ (grpcgen's shape). The consumer member tests/mwrap/slint-ui, the installed-template notice row and its validate step (headless). --- .github/workflows/validate.yml | 7 +++ CHANGELOG.md | 1 + mcpp.toml | 1 + pkgs/mwrap/slint.lua | 56 ++++++++++++++++++ pkgs/s/slintgen.lua | 59 +++++++++++++++++++ tests/mwrap/check_installed_template.py | 1 + tests/mwrap/slint-ui/build.mcpp | 12 ++++ tests/mwrap/slint-ui/mcpp.toml | 27 +++++++++ tests/mwrap/slint-ui/src/main.cpp | 37 ++++++++++++ tests/mwrap/slint-ui/tests/core_test.cpp | 46 +++++++++++++++ .../mwrap/slint-ui/tests/interpreter_test.cpp | 59 +++++++++++++++++++ tests/mwrap/slint-ui/ui/app.slint | 24 ++++++++ tests/mwrap/slint-ui/ui/palette.slint | 1 + 13 files changed, 331 insertions(+) create mode 100644 pkgs/mwrap/slint.lua create mode 100644 pkgs/s/slintgen.lua create mode 100644 tests/mwrap/slint-ui/build.mcpp create mode 100644 tests/mwrap/slint-ui/mcpp.toml create mode 100644 tests/mwrap/slint-ui/src/main.cpp create mode 100644 tests/mwrap/slint-ui/tests/core_test.cpp create mode 100644 tests/mwrap/slint-ui/tests/interpreter_test.cpp create mode 100644 tests/mwrap/slint-ui/ui/app.slint create mode 100644 tests/mwrap/slint-ui/ui/palette.slint diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 71973175..5a386d6c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1722,6 +1722,13 @@ jobs: shell: bash run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.sheenbidi@3.0.0 --deploy + - name: Installed Slint wrapper archive, actual default hello template (headless) and its relocated notices + if: contains(format(' {0} ', env.MEMBERS), ' slint-ui ') && matrix.toolchain == 'default' + shell: bash + env: + SLINT_HEADLESS: "1" + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.slint@1.19.0 --deploy + - name: Installed Wuffs wrapper archive, actual default decode template and its relocated notices if: contains(format(' {0} ', env.MEMBERS), ' wuffs-decode ') && matrix.toolchain == 'default' shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eaf813e..1638e32f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Added +- **mcpplibs.mwrap.slint 1.19.0:slint-m,Slint 作为 C++23 模块;mcpplibs.slintgen 1.19.0:构建规则 `mcpp.plugins.slint`。** 模块 `mcpplibs.mwrap.slint`(slint、slint::language)、`.interpreter`、`.platform`(仅 Clang;GCC 16 在包着 `slint-platform.h` 的模块上 ICE,故以文本 `#include` 提供)与 `.macros`(13 个 `SLINT_FEATURE_*` 常量),导出面由 SDK 头文件的 AST 生成并审计;链接 compat.slint 1.19.0。规则包 slintgen(同一归档的 `rules/`,与 grpcgen 同形)为每个 `.slint` 文件运行 `slint-compiler`(上游 `slint_target_sources` 的选项、每个输入一条带 depfile 的 action),设置 `module` 后每个文件还生成一个模块单元(`import app.ui;`);工程在 `[build-dependencies]` 写 `features = ["slint"]` 以认领 `.slint`。引擎对 `mcpp.plugins.slint` 每次构建给一条警告(R9.6:该命名空间属于 mcpp 项目;名字由维护者决定)。成员 tests/mwrap/slint-ui;默认模板 `hello`(无头时用软件渲染器)。Linux x86_64、macOS arm64、Windows x86_64(compat.slint 的载荷暂无 Linux aarch64)。 - **compat.slint 1.19.0:Slint 的 C++ SDK(`libslint_cpp`、头文件 `slint/`、`slint-compiler`),上游 CMake 的桌面默认功能集(GPL-3.0-only / Royalty-free-2.0 / Software-3.0 三选一)。** 载荷是生态里的 `xim:slint`(xlings-res/slint,GitHub 与 GitCode 逐字节相同;Linux x86_64、macOS arm64、Windows x86_64),由发布 tag 经 cargo 按默认功能集构建:Linux 上 `libslint_cpp` 只 NEEDED fontconfig 与 C 运行时(X11、Wayland、GL 均 dlopen)。描述符把载荷的 include、lib(Windows 为 bin 的 DLL)与 `slint-compiler` 放进包的目录,`SLINT_FEATURE_*` 由 `` 的默认功能集定义。成员 tests/examples/slint:SharedString、VectorModel、Color,解释器编译一段源码并在无头平台上驱动组件。Linux aarch64 暂缺:`xim:fontconfig` 尚无 aarch64 载荷。 - **mcpplibs.mwrap.wuffs 0.3.6:wuffs-m(Wuffs 的 C++23 模块),基于 compat.wuffs 0.3.6。** 每个上游包一个模块(`.base`、`.png`、`.gif`、`.json`、`.gzip` 等 16 个)、`.aux`(`wuffs_aux`)与 `.macros`;由 clang AST 生成并审计:429 个全局名导出,315 个 `static inline` 函数在 `mcpplibs::mwrap::wuffs` 中同名同签名适配,296 个宏常量与 34 个函数名宏映射,11 个附原因列出。上游 `convert-to-nia` 的模块移植版与上游程序在 `test/data` 的 246 个文件上逐字节一致,82/82 个 NIA 校验和一致。成员 tests/mwrap/wuffs-decode;validate.yml 以真实归档做已安装模板与部署通知检查。CN:mcpp-res/mwrap-wuffs。 - **compat.wuffs 0.3.6:Google 的 Wuffs,面向不可信文件格式的内存安全解码器(Apache-2.0)。** 上游只发布单文件 `release/c/wuffs-v0.3.c`:本包取 tag 归档,以一个生成的翻译单元在 `WUFFS_IMPLEMENTATION` 下按 C++ 编译,C API(`extern "C"`)与只在 C++ 下定义的 `wuffs_aux`(DecodeImage、DecodeJson、DecodeCbor)都在同一个库里;使用者按上游写法 `#include `。成员 tests/examples/wuffs:版本串、gzip 经 C API、CRC-32 与 Adler-32 的标准校验值、PNG 经 DecodeImage 逐像素、截断 PNG 被拒绝、JSON 遍历。0.4 线上游仍为 alpha。 diff --git a/mcpp.toml b/mcpp.toml index 2f31b434..b0376019 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -23,6 +23,7 @@ members = [ "tests/mwrap/pocketpy-embed", "tests/mwrap/libpng-image", "tests/mwrap/libwebp-image", + "tests/mwrap/slint-ui", "tests/mwrap/wuffs-decode", "tests/mwrap/concurrentqueue-mpmc", "tests/mwrap/fribidi-bidi", diff --git a/pkgs/mwrap/slint.lua b/pkgs/mwrap/slint.lua new file mode 100644 index 00000000..9ee898f5 --- /dev/null +++ b/pkgs/mwrap/slint.lua @@ -0,0 +1,56 @@ +-- Immutable upstream-aligned mwrap source release (slint-m mwrap-1.19.0); +-- GLOBAL and CN bytes are identical. +-- +-- The wrapper is Apache-2.0. The library it links, compat.slint (Slint 1.19.0, +-- upstream CMake's desktop default features), is Slint's own three-way +-- license (GPL-3.0-only, Royalty-free-2.0 or the Software license, at the +-- user's choice); the package deploys Slint's README, LICENSE.md and the three +-- license texts beside programs (runtime.deploy). Linux x86_64, macOS arm64 and +-- Windows x86_64: compat.slint's payload has no Linux aarch64 row yet. +-- +-- The build rule mcpp.plugins.slint is the separate package mcpplibs.slintgen +-- (rules/ of the same archive). +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "slint", + description = "slint-m: Slint (declarative GUI toolkit) as C++23 modules: the runtime API, the interpreter, the platform API and the features as constants", + licenses = { "Apache-2.0" }, + repo = "https://github.com/mcpplibs/slint-m", + type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/slint-m/releases/download/${tag}/slint-m-${version}.tar.gz", + }, + }, + xpm = { + linux = { + ["1.19.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + }, + sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + }, + }, + macosx = { + ["1.19.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + }, + sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + }, + }, + windows = { + ["1.19.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + }, + sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + }, + }, + }, +} diff --git a/pkgs/s/slintgen.lua b/pkgs/s/slintgen.lua new file mode 100644 index 00000000..d2b15a2a --- /dev/null +++ b/pkgs/s/slintgen.lua @@ -0,0 +1,59 @@ +-- slintgen -- slint-compiler as an importable build rule (module mcpp.plugins.slint). +-- +-- [build-dependencies] +-- mcpplibs.slintgen = { version = "1.19.0", features = ["slint"] } +-- +-- // build.mcpp +-- import mcpp; +-- import mcpp.plugins.slint; +-- int main() { return mcpp::plugins::slint::compile({}) ? 0 : 1; } +-- +-- The rule is this ecosystem's own C++ (not upstream's), so it stays in +-- `mcpplibs`; it ships in the rules/ directory of the slint-m archive, as +-- grpcgen ships in grpc-m's. The feature `slint` claims `.slint` as a source +-- the rule compiles; the project names it. +-- +-- SPEC-007 R9.6 keeps `mcpp.plugins.*` for the mcpp namespace: the engine warns +-- once per build that this package provides the module. The name is the +-- maintainer's choice (mcpplibs/slint-m#1). +package = { + spec = "1", + namespace = "mcpplibs", + name = "slintgen", + description = "slint-compiler as an importable mcpp build rule (host-module mcpp.plugins.slint)", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpplibs/slint-m", + type = "package", + + xpm = { + linux = { + ["1.19.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + }, + sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + }, + }, + macosx = { + ["1.19.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + }, + sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + }, + }, + windows = { + ["1.19.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + }, + sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + }, + }, + }, + + mcpp = "*/rules/mcpp.toml", +} diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index a64e8382..e1d73516 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -31,6 +31,7 @@ "mcpplibs.mwrap.libc": ("libc.cppm", None, b"", b"ISO/IEC 9899:2018"), "mcpplibs.mwrap.abseil": ("abseil.cppm", "upstream/abseil-cpp/LICENSE", b"Apache License", b"The Abseil Authors"), "mcpplibs.mwrap.openssl": ("openssl.cppm", "upstream/openssl/LICENSE.txt", b"Apache License", b"The OpenSSL Project Authors"), + "mcpplibs.mwrap.slint": ("slint.cppm", "upstream/slint/LICENSE.md", b"Slint License", b"SixtyFPS"), "mcpplibs.mwrap.wuffs": ("wuffs.cppm", "upstream/wuffs/LICENSE", b"Apache License", b"The Wuffs Authors"), "mcpplibs.mwrap.protobuf": ("protobuf.cppm", "upstream/protobuf/LICENSE", b"Redistribution and use in source and binary forms", b"Google"), } diff --git a/tests/mwrap/slint-ui/build.mcpp b/tests/mwrap/slint-ui/build.mcpp new file mode 100644 index 00000000..d0a27d89 --- /dev/null +++ b/tests/mwrap/slint-ui/build.mcpp @@ -0,0 +1,12 @@ +// `ui/app.slint` reaches mcpp.plugins.slint from `[build] sources`; the module +// `app.ui` exports what the file exports and slint-compiler generates. The SDK +// is compat.slint, reached through mcpplibs.mwrap.slint. +import mcpp; +import mcpp.plugins.slint; + +int main() { + mcpp::plugins::slint::options o; + o.module = "app.ui"; + o.style = "fluent"; + return mcpp::plugins::slint::compile(o) ? 0 : 1; +} diff --git a/tests/mwrap/slint-ui/mcpp.toml b/tests/mwrap/slint-ui/mcpp.toml new file mode 100644 index 00000000..e826ebc3 --- /dev/null +++ b/tests/mwrap/slint-ui/mcpp.toml @@ -0,0 +1,27 @@ +[package] +name = "slint-ui" +version = "1.19.0" +description = "Consume the immutable Slint wrapper: the runtime types and the interpreter through the modules, a .slint file compiled by mcpp.plugins.slint into the module app.ui, a component driven headless, the features as constants" + +[language] +standard = "c++23" +modules = true +import_std = false + +[indices] +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. + +[dependencies] +mcpplibs.mwrap.slint = "1.19.0" + +# The build rule (module mcpp.plugins.slint): the project names the feature that claims `.slint`. +[build-dependencies] +mcpplibs.slintgen = { version = "1.19.0", features = ["slint"] } + +[build] +sources = ["src/*.cpp", "ui/app.slint"] + +[targets.slint-ui] +kind = "bin" +main = "src/main.cpp" diff --git a/tests/mwrap/slint-ui/src/main.cpp b/tests/mwrap/slint-ui/src/main.cpp new file mode 100644 index 00000000..df0d68c2 --- /dev/null +++ b/tests/mwrap/slint-ui/src/main.cpp @@ -0,0 +1,37 @@ +// The component and its types through `import app.ui;` (the module the rule +// writes beside the header); Slint's own software renderer behind a headless +// platform, so the program runs on every host without a display. +#include +#include +#include // textual, before the import: GCC 16 refuses SoftwareRenderer in a module + +import app.ui; + +namespace { +struct HeadlessWindow : slint::platform::WindowAdapter { + slint::platform::SoftwareRenderer renderer_{slint::platform::SoftwareRenderer::RepaintBufferType::NewBuffer}; + slint::platform::AbstractRenderer& renderer() override { return renderer_; } + slint::PhysicalSize size() override { return slint::PhysicalSize({ .width = 320, .height = 240 }); } +}; +struct HeadlessPlatform : slint::platform::Platform { + std::unique_ptr create_window_adapter() override { + return std::make_unique(); + } +}; +} // namespace + +int main() { + slint::platform::set_platform(std::make_unique()); + auto ui = AppWindow::create(); + int calls = 0; + ui->on_request_increase_value([&] { ui->set_counter(ui->get_counter() + 1); ++calls; }); + ui->invoke_request_increase_value(); + ui->set_origin(Point{3, 4}); + ui->global().set_title("changed"); + const bool dark = ui->global().get_background() == slint::Color::from_rgb_uint8(0x20, 0x20, 0x20); + const Mode mode = Mode::Dark; + std::printf("counter=%d calls=%d origin=%d,%d title=%s background=%s mode=%d\n", ui->get_counter(), calls, + ui->get_origin().x, ui->get_origin().y, ui->global().get_title().data(), + dark ? "#202020" : "other", static_cast(mode)); + return (ui->get_counter() == 43 && calls == 1 && ui->get_origin().y == 4 && dark) ? 0 : 1; +} diff --git a/tests/mwrap/slint-ui/tests/core_test.cpp b/tests/mwrap/slint-ui/tests/core_test.cpp new file mode 100644 index 00000000..c4947da2 --- /dev/null +++ b/tests/mwrap/slint-ui/tests/core_test.cpp @@ -0,0 +1,46 @@ +// Slint's runtime types through `import mcpplibs.mwrap.slint;` alone: strings, +// vectors, models, colours, brushes and geometry are the library's (every call +// below reaches libslint_cpp), and the SDK's features are constants. +import std; +import mcpplibs.mwrap.slint; + +namespace { +int failures = 0; +void check(bool ok, std::string_view what) { + std::println("{} {}", ok ? "ok " : "FAIL", what); + failures += !ok; +} +} // namespace + +int main() { + slint::SharedString s("Hello"); + s += ", Slint"; + check(std::string_view(s) == "Hello, Slint", "SharedString concatenates"); + check(slint::SharedString::from_number(42.5) == "42.5", "SharedString::from_number"); + + slint::SharedVector v{1, 2, 3}; + v.push_back(4); + check(v.size() == 4 && v[3] == 4, "SharedVector grows"); + + auto model = std::make_shared>(); + model->push_back("a"); + model->push_back("b"); + model->set_row_data(1, "c"); + check(model->row_count() == 2 && *model->row_data(1) == "c", "VectorModel rows"); + + auto red = slint::Color::from_rgb_uint8(255, 0, 0); + auto blue = slint::Color::from_rgb_uint8(0, 0, 255); + auto purple = red.mix(blue, 0.5f); + check(red.red() == 255 && purple.red() > 100 && purple.blue() > 100, "Color mixes"); + check(red.brighter(0.5f).red() == 255, "Color::brighter"); + check(slint::Brush(red).color() == red, "Brush of a colour"); + + slint::LogicalSize size({ .width = 3.f, .height = 4.f }); + check(size.width == 3.f && size.height == 4.f, "LogicalSize"); + + namespace m = mcpplibs::mwrap::slint::macros; + check(m::SLINT_FEATURE_INTERPRETER && m::SLINT_FEATURE_RENDERER_SOFTWARE && m::SLINT_FEATURE_BACKEND_WINIT, + "the default features are on"); + check(!m::SLINT_FEATURE_RENDERER_SKIA && !m::SLINT_FEATURE_EXPERIMENTAL, "Skia and the experimental API are off"); + return failures ? 1 : 0; +} diff --git a/tests/mwrap/slint-ui/tests/interpreter_test.cpp b/tests/mwrap/slint-ui/tests/interpreter_test.cpp new file mode 100644 index 00000000..90948e38 --- /dev/null +++ b/tests/mwrap/slint-ui/tests/interpreter_test.cpp @@ -0,0 +1,59 @@ +// A `.slint` source compiled at run time by slint::interpreter, instantiated +// on a headless platform (Slint's own software renderer) and driven through +// its properties and callbacks -- no generated code, no display. +#if !defined(__clang__) +#include // GCC 16: the platform module is Clang's (tools/gen_exports.py) +#endif + +import std; +import mcpplibs.mwrap.slint; +import mcpplibs.mwrap.slint.interpreter; +#if defined(__clang__) +import mcpplibs.mwrap.slint.platform; +#endif + +namespace { +int failures = 0; +void check(bool ok, std::string_view what) { + std::println("{} {}", ok ? "ok " : "FAIL", what); + failures += !ok; +} + +struct HeadlessWindow : slint::platform::WindowAdapter { + slint::platform::SoftwareRenderer renderer_{slint::platform::SoftwareRenderer::RepaintBufferType::NewBuffer}; + slint::platform::AbstractRenderer& renderer() override { return renderer_; } + slint::PhysicalSize size() override { return slint::PhysicalSize({ .width = 200, .height = 100 }); } +}; +struct HeadlessPlatform : slint::platform::Platform { + std::unique_ptr create_window_adapter() override { + return std::make_unique(); + } +}; + +constexpr std::string_view source = R"( +export component Counter inherits Window { + in-out property count: 1; + in property label: "clicks"; + callback bump(int) -> int; + bump(n) => { count += n; return count; } + Text { text: "\{label}: \{count}"; } +} +)"; +} // namespace + +int main() { + slint::platform::set_platform(std::make_unique()); + slint::interpreter::ComponentCompiler compiler; + auto definition = compiler.build_from_source(std::string(source), ""); + for (auto const& d : compiler.diagnostics()) std::println("diagnostic: {}", std::string_view(d.message)); + check(definition.has_value(), "the source compiles"); + if (!definition) return 1; + auto instance = definition->create(); + check(instance->get_property("count")->to_number() == 1.0, "the property's initial value"); + check(instance->set_property("label", slint::SharedString("taps")), "a property is set"); + auto result = instance->invoke("bump", std::array{slint::interpreter::Value(41.0)}); + check(result && result->to_number() == 42.0, "a callback runs and returns"); + check(instance->get_property("count")->to_number() == 42.0, "the callback changed the property"); + check(*instance->get_property("label")->to_string() == "taps", "the string property"); + return failures ? 1 : 0; +} diff --git a/tests/mwrap/slint-ui/ui/app.slint b/tests/mwrap/slint-ui/ui/app.slint new file mode 100644 index 00000000..2087d6d5 --- /dev/null +++ b/tests/mwrap/slint-ui/ui/app.slint @@ -0,0 +1,24 @@ +import { Button, VerticalBox } from "std-widgets.slint"; +import { Palette } from "palette.slint"; + +export enum Mode { light, dark } +export struct Point { x: int, y: int } +export global Settings { in-out property title: "hello"; } + +// Not a window: slint-compiler generates nothing for it, and the module does not export it. +export component Badge inherits Rectangle { in property label; } + +component Base inherits Window { in-out property mode: Mode.light; } + +export component AppWindow inherits Base { + in-out property counter: 42; + in-out property origin; + callback request-increase-value(); + background: Palette.background; + VerticalBox { + Text { text: "Counter: \{root.counter}"; } + Button { text: "Increase value"; clicked => { root.request-increase-value(); } } + } +} + +export { Palette as Colors } diff --git a/tests/mwrap/slint-ui/ui/palette.slint b/tests/mwrap/slint-ui/ui/palette.slint new file mode 100644 index 00000000..d4442e37 --- /dev/null +++ b/tests/mwrap/slint-ui/ui/palette.slint @@ -0,0 +1 @@ +export global Palette { out property background: #202020; } From 2fbe0cc4a9f9c16affa87464798d5d99240e5a0c Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Fri, 20 Nov 2026 22:41:06 +0900 Subject: [PATCH 2/2] mcpplibs.mwrap.slint + mcpplibs.slintgen 1.19.0.1: the rule module is slint.mcpp.plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit slint-m mwrap-1.19.0.1 (sha256 ed0da17d…, GLOBAL and CN identical): the module no longer starts with mcpp., so the member gate (R9.6) admits it. mwrap-1.19.0 was never indexed. --- .../docs/2026-11-20-add-slint-mwrap-plan.md | 23 +++++------ .github/workflows/validate.yml | 2 +- CHANGELOG.md | 2 +- pkgs/mwrap/slint.lua | 28 ++++++------- pkgs/s/slintgen.lua | 39 ++++++++++--------- tests/mwrap/slint-ui/build.mcpp | 4 +- tests/mwrap/slint-ui/mcpp.toml | 10 ++--- 7 files changed, 55 insertions(+), 53 deletions(-) diff --git a/.agents/docs/2026-11-20-add-slint-mwrap-plan.md b/.agents/docs/2026-11-20-add-slint-mwrap-plan.md index 7863d27b..4d596258 100644 --- a/.agents/docs/2026-11-20-add-slint-mwrap-plan.md +++ b/.agents/docs/2026-11-20-add-slint-mwrap-plan.md @@ -1,6 +1,6 @@ -# 实施方案:Slint 进入 mcpp 生态(compat.slint + mcpplibs.mwrap.slint + 构建规则 mcpp.plugins.slint) +# 实施方案:Slint 进入 mcpp 生态(compat.slint + mcpplibs.mwrap.slint + 构建规则 slint.mcpp.plugins) -状态:已按维护者决定修订(2026-11-20):规则放入 slint-m,模块名 `mcpp.plugins.slint`。上游版本:Slint 1.19.0(2026-11-16)。 +状态:已按维护者决定修订(2026-11-20):规则放入 slint-m,模块名 `slint.mcpp.plugins`(`slint.mcpp.plugins` 被索引的 R9.6 收录门拒绝,见 §1 修订记录)。上游版本:Slint 1.19.0(2026-11-16)。 本文的事实均为实测或读源码所得,出处写在各条之后;未验证的部分列在 §9。 ## 0. 目标 @@ -11,7 +11,7 @@ |---|---| | `find_package(Slint)` + 预构建 SDK | `compat.slint` 的预构建档位(xlings-res,GitHub + GitCode) | | `FetchContent(... SOURCE_SUBDIR api/cpp)` + `SLINT_FEATURE_*` | `compat.slint` 的同名 feature;未预构建的组合走源码构建(cargo,§4.3) | -| `slint_target_sources(...)` 与目标属性 | 构建规则 `mcpp.plugins.slint`(包 `mcpplibs.slintgen`,slint-m 的 `rules/`,§5) | +| `slint_target_sources(...)` 与目标属性 | 构建规则 `slint.mcpp.plugins`(包 `mcpplibs.slintgen`,slint-m 的 `rules/`,§5) | | `#include "app.h"` | 同上,另可 `import` 生成的组件模块(§5.3) | | — | `import mcpplibs.mwrap.slint;`(§6) | @@ -21,12 +21,13 @@ |---|---|---| | 上游库原样构建 | `compat.<名>` | `compat.slint` | | 通用 C++ 库的模块封装 | `mcpplibs.mwrap.<名>`(docs/mwrap.md) | `mcpplibs.mwrap.slint`,仓库 `mcpplibs/slint-m` | -| mcpp 专用构建插件(导入引擎接口 `mcpp`) | 通常 `mcpp.<命名空间>.*`(R9.6);保留的第二段只属于命名空间为 `mcpp` 的包 | 包 `mcpplibs.slintgen`(slint-m 的 `rules/`,与 grpc-m 的 `grpcgen` 同形),模块 `mcpp.plugins.slint` | +| mcpp 专用构建插件(导入引擎接口 `mcpp`) | 通常 `mcpp.<命名空间>.*`(R9.6);保留的第二段只属于命名空间为 `mcpp` 的包 | 包 `mcpplibs.slintgen`(slint-m 的 `rules/`,与 grpc-m 的 `grpcgen` 同形),模块 `slint.mcpp.plugins` | **修订记录。** 初版把规则放进官方插件包 `mcpp.plugins`(feature `rules-slint`,模块 `mcpp.rules.slint`),依据是 `rules-qt` -等先例与 R9.6。维护者决定改为放入 slint-m、模块名 `mcpp.plugins.slint`(mcpp-plugins#64 已不合入关闭)。代价已核实: -(1) 引擎对每次构建打印一条警告——`mcpp.plugins.slint` 由命名空间不是 `mcpp` 的包提供(R9.6,"Nothing breaks"; -警告建议 `mcpp.mcpplibs.*`);(2) `device_extensions` 的认领不经 `reexport` 传递,所以工程须自己在 +等先例与 R9.6。维护者决定改为放入 slint-m、模块名 `slint.mcpp.plugins`(mcpp-plugins#64 已不合入关闭)。代价已核实: +(1) 实测:`mcpp.plugins.slint` 由命名空间不是 `mcpp` 的包提供,引擎每次构建警告,而索引的成员门(tests/run_members.sh) +拒绝此类包,mcpp-index#861 因此失败;维护者改定模块名为 `slint.mcpp.plugins`(不以 `mcpp.` 起头,不受 R9.6 约束), +以修订号 1.19.0.1 发布(mwrap-1.19.0 已打标签、未收录);(2) `device_extensions` 的认领不经 `reexport` 传递,所以工程须自己在 `[build-dependencies]` 写 `mcpplibs.slintgen = { …, features = ["slint"] }`,slint-m 不再 reexport 规则; (3) 规则对 `mcpp.plugins`(feature `plugins-core`)的依赖写在规则包自己的 `[dependencies]`(mcpp 2026.10.11.1+ 形态)。 @@ -75,7 +76,7 @@ xlings-res(GitHub + GitCode) slint-vendor//slint--vendor.tar.zst cargo vendor(源码构建离线依赖) skia-binaries//... rust-skia 预构建的逐字节镜像 mcpplibs/slint-m - src/*.cppm include/mwrap/slint/macros.hpp rules/(slintgen,模块 mcpp.plugins.slint) templates/hello tests tools + src/*.cppm include/mwrap/slint/macros.hpp rules/(slintgen,模块 slint.mcpp.plugins) templates/hello tests tools ``` ## 4. compat.slint @@ -114,7 +115,7 @@ feature 名与上游 cargo 功能名逐一相同(kebab-case,与 mwrap 规范 (如 `mcpp:slint-runtime`)互斥,`mcpplibs.mwrap.slint` 的 feature 经 `feature-deps` 选择提供者;或单一包内由 install / build 程序按功能集选择载荷。以 S2 的实测结果定稿。 -## 5. 构建规则 mcpp.plugins.slint(slint-m 的 rules/) +## 5. 构建规则 slint.mcpp.plugins(slint-m 的 rules/) ### 5.1 形态 @@ -125,7 +126,7 @@ mcpp.plugins = { version = "0.26.1", features = ["plugins-core"] } [features.slint] sources = ["src/slint.cppm"] -rule_module = "mcpp.plugins.slint" +rule_module = "slint.mcpp.plugins" device_extensions = [".slint"] ``` 与 `rules-qt` 相同:不声明 SDK、不固定版本。`slint-compiler` 的来源按序:`options::compiler`;环境变量 `SLINT_COMPILER`; @@ -174,7 +175,7 @@ device_extensions = [".slint"] | 阶段 | 交付 | 验收 | |---|---|---| | 0(实测) | S1–S3(§9) | 结论写回本文 | -| 1 | xlings-res `slint` 的 `default` 档(4 平台,GLOBAL + CN);compat.slint 1.19.0(default 档,feature 与上游同名);`mcpp.plugins.slint`;slint-m(核心、`.interpreter`、`.platform`、`.macros`)与 `hello` 模板 | Linux(gcc/llvm)、Linux arm64、macOS、Windows 的 CI:模板严格构建并无头运行;规则的增量测试;运行时依赖闭包只含声明的提供者;导出审计 | +| 1 | xlings-res `slint` 的 `default` 档(4 平台,GLOBAL + CN);compat.slint 1.19.0(default 档,feature 与上游同名);`slint.mcpp.plugins`;slint-m(核心、`.interpreter`、`.platform`、`.macros`)与 `hello` 模板 | Linux(gcc/llvm)、Linux arm64、macOS、Windows 的 CI:模板严格构建并无头运行;规则的增量测试;运行时依赖闭包只含声明的提供者;导出审计 | | 2 | `slint-vendor` 载荷;源码构建路径(任意功能组合) | 一个非档位组合(如 `default` + `gettext`)冷构建与二次缓存命中 | | 3 | `skia-binaries` 镜像;`full` 档;`renderer-skia*` | CN 镜像下无 GitHub 访问构建成功;Skia 渲染无头截图比对 | | 4 | linuxkms(compat.libinput soname)、Android / iOS / wasm / MCU 行、`backend-qt`、`gettext` | 各平台行的模板构建;KMS 以无显示设备的冒烟测试 | diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5a386d6c..654f2e80 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1727,7 +1727,7 @@ jobs: shell: bash env: SLINT_HEADLESS: "1" - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.slint@1.19.0 --deploy + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.slint@1.19.0.1 --deploy - name: Installed Wuffs wrapper archive, actual default decode template and its relocated notices if: contains(format(' {0} ', env.MEMBERS), ' wuffs-decode ') && matrix.toolchain == 'default' diff --git a/CHANGELOG.md b/CHANGELOG.md index 1638e32f..9005b39c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Added -- **mcpplibs.mwrap.slint 1.19.0:slint-m,Slint 作为 C++23 模块;mcpplibs.slintgen 1.19.0:构建规则 `mcpp.plugins.slint`。** 模块 `mcpplibs.mwrap.slint`(slint、slint::language)、`.interpreter`、`.platform`(仅 Clang;GCC 16 在包着 `slint-platform.h` 的模块上 ICE,故以文本 `#include` 提供)与 `.macros`(13 个 `SLINT_FEATURE_*` 常量),导出面由 SDK 头文件的 AST 生成并审计;链接 compat.slint 1.19.0。规则包 slintgen(同一归档的 `rules/`,与 grpcgen 同形)为每个 `.slint` 文件运行 `slint-compiler`(上游 `slint_target_sources` 的选项、每个输入一条带 depfile 的 action),设置 `module` 后每个文件还生成一个模块单元(`import app.ui;`);工程在 `[build-dependencies]` 写 `features = ["slint"]` 以认领 `.slint`。引擎对 `mcpp.plugins.slint` 每次构建给一条警告(R9.6:该命名空间属于 mcpp 项目;名字由维护者决定)。成员 tests/mwrap/slint-ui;默认模板 `hello`(无头时用软件渲染器)。Linux x86_64、macOS arm64、Windows x86_64(compat.slint 的载荷暂无 Linux aarch64)。 +- **mcpplibs.mwrap.slint 1.19.0.1:slint-m,Slint 作为 C++23 模块;mcpplibs.slintgen 1.19.0.1:构建规则,模块 `slint.mcpp.plugins`。** 模块 `mcpplibs.mwrap.slint`(slint、slint::language)、`.interpreter`、`.platform`(仅 Clang;GCC 16 在包着 `slint-platform.h` 的模块上 ICE,故以文本 `#include` 提供)与 `.macros`(13 个 `SLINT_FEATURE_*` 常量),导出面由 SDK 头文件的 AST 生成并审计;链接 compat.slint 1.19.0。规则包 slintgen(同一归档的 `rules/`,与 grpcgen 同形)为每个 `.slint` 文件运行 `slint-compiler`(上游 `slint_target_sources` 的选项、每个输入一条带 depfile 的 action),设置 `module` 后每个文件还生成一个模块单元(`import app.ui;`);工程在 `[build-dependencies]` 写 `features = ["slint"]` 以认领 `.slint`。模块以库名命名而不用 `mcpp.plugins.*`(R9.6 把它留给 mcpp 命名空间,索引不收录此类包);1.19.0 已打标签与镜像但未收录,改名以修订号 1.19.0.1 发布。成员 tests/mwrap/slint-ui;默认模板 `hello`(无头时用软件渲染器)。Linux x86_64、macOS arm64、Windows x86_64(compat.slint 的载荷暂无 Linux aarch64)。 - **compat.slint 1.19.0:Slint 的 C++ SDK(`libslint_cpp`、头文件 `slint/`、`slint-compiler`),上游 CMake 的桌面默认功能集(GPL-3.0-only / Royalty-free-2.0 / Software-3.0 三选一)。** 载荷是生态里的 `xim:slint`(xlings-res/slint,GitHub 与 GitCode 逐字节相同;Linux x86_64、macOS arm64、Windows x86_64),由发布 tag 经 cargo 按默认功能集构建:Linux 上 `libslint_cpp` 只 NEEDED fontconfig 与 C 运行时(X11、Wayland、GL 均 dlopen)。描述符把载荷的 include、lib(Windows 为 bin 的 DLL)与 `slint-compiler` 放进包的目录,`SLINT_FEATURE_*` 由 `` 的默认功能集定义。成员 tests/examples/slint:SharedString、VectorModel、Color,解释器编译一段源码并在无头平台上驱动组件。Linux aarch64 暂缺:`xim:fontconfig` 尚无 aarch64 载荷。 - **mcpplibs.mwrap.wuffs 0.3.6:wuffs-m(Wuffs 的 C++23 模块),基于 compat.wuffs 0.3.6。** 每个上游包一个模块(`.base`、`.png`、`.gif`、`.json`、`.gzip` 等 16 个)、`.aux`(`wuffs_aux`)与 `.macros`;由 clang AST 生成并审计:429 个全局名导出,315 个 `static inline` 函数在 `mcpplibs::mwrap::wuffs` 中同名同签名适配,296 个宏常量与 34 个函数名宏映射,11 个附原因列出。上游 `convert-to-nia` 的模块移植版与上游程序在 `test/data` 的 246 个文件上逐字节一致,82/82 个 NIA 校验和一致。成员 tests/mwrap/wuffs-decode;validate.yml 以真实归档做已安装模板与部署通知检查。CN:mcpp-res/mwrap-wuffs。 - **compat.wuffs 0.3.6:Google 的 Wuffs,面向不可信文件格式的内存安全解码器(Apache-2.0)。** 上游只发布单文件 `release/c/wuffs-v0.3.c`:本包取 tag 归档,以一个生成的翻译单元在 `WUFFS_IMPLEMENTATION` 下按 C++ 编译,C API(`extern "C"`)与只在 C++ 下定义的 `wuffs_aux`(DecodeImage、DecodeJson、DecodeCbor)都在同一个库里;使用者按上游写法 `#include `。成员 tests/examples/wuffs:版本串、gzip 经 C API、CRC-32 与 Adler-32 的标准校验值、PNG 经 DecodeImage 逐像素、截断 PNG 被拒绝、JSON 遍历。0.4 线上游仍为 alpha。 diff --git a/pkgs/mwrap/slint.lua b/pkgs/mwrap/slint.lua index 9ee898f5..8a5adda5 100644 --- a/pkgs/mwrap/slint.lua +++ b/pkgs/mwrap/slint.lua @@ -1,4 +1,4 @@ --- Immutable upstream-aligned mwrap source release (slint-m mwrap-1.19.0); +-- Immutable upstream-aligned mwrap source release (slint-m mwrap-1.19.0.1); -- GLOBAL and CN bytes are identical. -- -- The wrapper is Apache-2.0. The library it links, compat.slint (Slint 1.19.0, @@ -8,7 +8,7 @@ -- license texts beside programs (runtime.deploy). Linux x86_64, macOS arm64 and -- Windows x86_64: compat.slint's payload has no Linux aarch64 row yet. -- --- The build rule mcpp.plugins.slint is the separate package mcpplibs.slintgen +-- The build rule slint.mcpp.plugins is the separate package mcpplibs.slintgen -- (rules/ of the same archive). package = { spec = "1", @@ -26,30 +26,30 @@ package = { }, xpm = { linux = { - ["1.19.0"] = { + ["1.19.0.1"] = { url = { - GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0.1/slint-m-1.19.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0.1/slint-m-1.19.0.1.tar.gz", }, - sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + sha256 = "ed0da17d0e0394eba430b0e877c270251710885024f35cbb2ec1e7a71c0b7ee2", }, }, macosx = { - ["1.19.0"] = { + ["1.19.0.1"] = { url = { - GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0.1/slint-m-1.19.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0.1/slint-m-1.19.0.1.tar.gz", }, - sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + sha256 = "ed0da17d0e0394eba430b0e877c270251710885024f35cbb2ec1e7a71c0b7ee2", }, }, windows = { - ["1.19.0"] = { + ["1.19.0.1"] = { url = { - GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0.1/slint-m-1.19.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0.1/slint-m-1.19.0.1.tar.gz", }, - sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + sha256 = "ed0da17d0e0394eba430b0e877c270251710885024f35cbb2ec1e7a71c0b7ee2", }, }, }, diff --git a/pkgs/s/slintgen.lua b/pkgs/s/slintgen.lua index d2b15a2a..6c529d32 100644 --- a/pkgs/s/slintgen.lua +++ b/pkgs/s/slintgen.lua @@ -1,11 +1,11 @@ --- slintgen -- slint-compiler as an importable build rule (module mcpp.plugins.slint). +-- slintgen -- slint-compiler as an importable build rule (module slint.mcpp.plugins). -- -- [build-dependencies] --- mcpplibs.slintgen = { version = "1.19.0", features = ["slint"] } +-- mcpplibs.slintgen = { version = "1.19.0.1", features = ["slint"] } -- -- // build.mcpp -- import mcpp; --- import mcpp.plugins.slint; +-- import slint.mcpp.plugins; -- int main() { return mcpp::plugins::slint::compile({}) ? 0 : 1; } -- -- The rule is this ecosystem's own C++ (not upstream's), so it stays in @@ -13,44 +13,45 @@ -- grpcgen ships in grpc-m's. The feature `slint` claims `.slint` as a source -- the rule compiles; the project names it. -- --- SPEC-007 R9.6 keeps `mcpp.plugins.*` for the mcpp namespace: the engine warns --- once per build that this package provides the module. The name is the --- maintainer's choice (mcpplibs/slint-m#1). +-- The module is named under the library's name, not `mcpp.plugins.*`: SPEC-007 +-- R9.6 keeps that for the mcpp namespace and the index admits no package that +-- provides such a module (tests/run_members.sh). 1.19.0.1 is the wrapper +-- revision that renamed it; mwrap-1.19.0 was tagged and never indexed. package = { spec = "1", namespace = "mcpplibs", name = "slintgen", - description = "slint-compiler as an importable mcpp build rule (host-module mcpp.plugins.slint)", + description = "slint-compiler as an importable mcpp build rule (host-module slint.mcpp.plugins)", licenses = {"Apache-2.0"}, repo = "https://github.com/mcpplibs/slint-m", type = "package", xpm = { linux = { - ["1.19.0"] = { + ["1.19.0.1"] = { url = { - GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0.1/slint-m-1.19.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0.1/slint-m-1.19.0.1.tar.gz", }, - sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + sha256 = "ed0da17d0e0394eba430b0e877c270251710885024f35cbb2ec1e7a71c0b7ee2", }, }, macosx = { - ["1.19.0"] = { + ["1.19.0.1"] = { url = { - GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0.1/slint-m-1.19.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0.1/slint-m-1.19.0.1.tar.gz", }, - sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + sha256 = "ed0da17d0e0394eba430b0e877c270251710885024f35cbb2ec1e7a71c0b7ee2", }, }, windows = { - ["1.19.0"] = { + ["1.19.0.1"] = { url = { - GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0/slint-m-1.19.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0/slint-m-1.19.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/slint-m/releases/download/mwrap-1.19.0.1/slint-m-1.19.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-slint/releases/download/1.19.0.1/slint-m-1.19.0.1.tar.gz", }, - sha256 = "f75b8fb3ce6e779a176fe47f4a8e07df8bec8713e2b1bde7f199e1400097ddd9", + sha256 = "ed0da17d0e0394eba430b0e877c270251710885024f35cbb2ec1e7a71c0b7ee2", }, }, }, diff --git a/tests/mwrap/slint-ui/build.mcpp b/tests/mwrap/slint-ui/build.mcpp index d0a27d89..1e15793e 100644 --- a/tests/mwrap/slint-ui/build.mcpp +++ b/tests/mwrap/slint-ui/build.mcpp @@ -1,8 +1,8 @@ -// `ui/app.slint` reaches mcpp.plugins.slint from `[build] sources`; the module +// `ui/app.slint` reaches slint.mcpp.plugins from `[build] sources`; the module // `app.ui` exports what the file exports and slint-compiler generates. The SDK // is compat.slint, reached through mcpplibs.mwrap.slint. import mcpp; -import mcpp.plugins.slint; +import slint.mcpp.plugins; int main() { mcpp::plugins::slint::options o; diff --git a/tests/mwrap/slint-ui/mcpp.toml b/tests/mwrap/slint-ui/mcpp.toml index e826ebc3..19aae749 100644 --- a/tests/mwrap/slint-ui/mcpp.toml +++ b/tests/mwrap/slint-ui/mcpp.toml @@ -1,7 +1,7 @@ [package] name = "slint-ui" -version = "1.19.0" -description = "Consume the immutable Slint wrapper: the runtime types and the interpreter through the modules, a .slint file compiled by mcpp.plugins.slint into the module app.ui, a component driven headless, the features as constants" +version = "1.19.0.1" +description = "Consume the immutable Slint wrapper: the runtime types and the interpreter through the modules, a .slint file compiled by slint.mcpp.plugins into the module app.ui, a component driven headless, the features as constants" [language] standard = "c++23" @@ -13,11 +13,11 @@ import_std = false # An explicit empty table overrides the legacy workspace redirect. [dependencies] -mcpplibs.mwrap.slint = "1.19.0" +mcpplibs.mwrap.slint = "1.19.0.1" -# The build rule (module mcpp.plugins.slint): the project names the feature that claims `.slint`. +# The build rule (module slint.mcpp.plugins): the project names the feature that claims `.slint`. [build-dependencies] -mcpplibs.slintgen = { version = "1.19.0", features = ["slint"] } +mcpplibs.slintgen = { version = "1.19.0.1", features = ["slint"] } [build] sources = ["src/*.cpp", "ui/app.slint"]