Skip to content

0.27.0: rules-slint, a Slint user interface compiled by slint-compiler into headers and, on request, C++ modules - #64

Closed
Sunrisepeak wants to merge 1 commit into
mainfrom
feat/rules-slint
Closed

Sunrisepeak wants to merge 1 commit into
mainfrom
feat/rules-slint

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

0.27.0: rules-slint — a Slint user interface compiled by slint-compiler into headers and, on request, C++ modules: what upstream CMake's slint_target_sources does, as mcpp.rules.slint.

  • [features.rules-slint], rule_module = "mcpp.rules.slint", device_extensions = [".slint"].
  • One action per input with slint-compiler --depfile: an edit of the input or of a file it imports regenerates it alone; nothing changed regenerates nothing.
  • Options are slint_target_sources and its target properties: ns (NAMESPACE), library_paths, include_paths, compilation_units, edition, style, embed_resources, scale_factor, translation_domain, bundle_translations.
  • options::module: a module interface unit per input — the header in the global module fragment and export using for the windows (through component chains), structs, enums, globals and aliases the input exports and slint-compiler generates (read from the .slint files, following export … from); options::exports overrides. Including the header inside export { } is not possible: Clang refuses to export slint-compiler's out-of-class member definitions.
  • The SDK is the project's choice, as for Qt: options::compiler / options::root, SLINT_COMPILER, a compat.slint in the graph (dep_dir), or xim:slint declared in [xlings]; none is a warning. Without a package, the rule puts the SDK's include directory, slint_cpp and its run-time directory on the build.
  • Fixture tests/slint-consumer (+ check-slint.sh): a window through a base component, struct, enum, global, an aliased re-export and a non-window export (not exported); headless run with Slint's software renderer; incremental behaviour. In the Linux consumers job and on macOS / Windows. all-rules-compile imports and calls the rule.
  • Docs: docs/rules-slint.md, README, engine-and-rules.

Locally: the fixture builds and runs with GCC 16.1.0 and Clang 23.1.3 (counter=43 calls=1 origin=3,4 title=changed background=#202020 mode=1); editing palette.slint regenerates app.h; a no-change build does no work.

The fixture's SDK is xim:slint 1.19.0 (openxlings/xim-pkgindex#1208, payloads at xlings-res/slint); its CI step passes once that recipe is in the published xim index. Plan: mcpp-index .agents/docs/2026-11-20-add-slint-mwrap-plan.md.

@Sunrisepeak

Copy link
Copy Markdown
Member Author

Closed unmerged: the Slint build rule moves to mcpplibs/slint-m (rules/, package mcpplibs.slintgen, module mcpp.plugins.slint), per the maintainer's decision. Nothing from this branch is released in mcpp-plugins; no 0.27.0 will be cut for it.

@Sunrisepeak
Sunrisepeak deleted the feat/rules-slint branch November 20, 2026 12:43
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.

1 participant