Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcpp-plugins

The build plugins the mcpp project maintains, published as one package, mcpp:plugins. mcpp is a general engine with a framework for build plugins; plugins come from this package, from third parties, or from the project itself, and build.mcpp is where a project uses them. A consumer selects the members it needs through features, imports each one from build.mcpp under the module name the member declares, and configures it there.

[build-dependencies.mcpp]
plugins = { version = "0.18.0", features = ["rules-spirv"], host-module = true }
// build.mcpp
import std;
import mcpp;
import mcpp.rules.spirv;

int main() {
    mcpp::rules::spirv::options opt;
    opt.includes = { "shaders" };
    return mcpp::rules::spirv::compile(opt) ? 0 : 1;
}

The edge is a [build-dependencies] entry, not a [dependencies] entry: host-module = true states which build-time product is wanted, and the section states that the package does not reach the target. A rule's library is never linked into the artifact (mcpp docs/05 §2.6.1).

Naming

family module answers
rules mcpp.rules.<x> how one kind of translation unit is compiled by a compiler mcpp does not drive
tools mcpp.tools.<x> what the build program does itself (see tools/README.md)
dist mcpp.dist.<x> what comes out of the link, and in what form a user installs it
deps mcpp.deps.<x> where a library comes from
identity mcpp.plugins the lib root, compiled before every member; it states the collection's version

The second segments core, plugins, deps, rules, dist and tools of mcpp. belong to this package and the engine; a third-party plugin names its modules mcpp.<its namespace>.* (docs/plugin-development.md). The full account of the families, and of how the engine routes a file to a rule, is in docs/engine-and-rules.md.

Members

From 0.17.0 the package as a whole needs mcpp 2026.9.28.3 ([package] mcpp); the column states the release each member's behaviour first needed.

feature module mcpp floor what it does doc
rules-ascendc mcpp.rules.ascendc 2026.9.6.6 Compiles Ascend C (*.asc) with BiSheng in mixed mode, so the object joins the ordinary link. rules
rules-cuda mcpp.rules.cuda 2026.9.6.6 Compiles CUDA (*.cu) through clang with an LLVM toolchain or nvcc with a GCC one. rules
rules-hip mcpp.rules.hip 2026.9.6.6 Compiles HIP (*.hip) with the project's clang on the NVIDIA platform. rules
rules-metal mcpp.rules.metal 2026.9.8.1 Compiles .metal shaders into Metal libraries with the host's Xcode and deploys them beside the program. rules
rules-qt mcpp.rules.qt 2026.9.27.1 Runs moc, uic, rcc and Qt's Linguist tools as actions, links the Qt modules and places their runtime. rules-qt
rules-slang mcpp.rules.slang 2026.9.7.1 Compiles Slang (*.slang) and embeds or places the result. rules
rules-spirv mcpp.rules.spirv 2026.9.6.6 Compiles GLSL and HLSL shader stages to SPIR-V and embeds or places the result. rules
rules-swift mcpp.rules.swift 2026.9.8.1 Compiles a package's .swift sources into one module the C and C++ sources call. rules
rules-sycl mcpp.rules.sycl 2026.9.6.6 Compiles SYCL (*.sycl) with DPC++. rules
tools-embed mcpp.tools.embed 2026.9.5.4 Writes a data file into a header the program compiles in. tools-embed
tools-island mcpp.tools.island 2026.9.7.1 Generates the extern "C" boundary and the C++ module of a code island. tools-island
dist-appimage mcpp.dist.appimage 2026.9.11.1 Turns the tree mcpp pack stages into an AppImage (Linux). dist
dist-wix mcpp.dist.wix 2026.9.11.1 Builds an MSI of the staged tree, and a Burn bundle chaining it (Windows). dist
dist-apple mcpp.dist.apple 2026.9.14.2 Lays out a macOS or iOS application bundle, signs it and writes a disk image. dist-apple
dist-web mcpp.dist.web 2026.9.13.1 Copies a wasm32-emscripten program and its files into a web directory with an index.html. dist
dist-apk mcpp.dist.apk 2026.9.14.2 Packs the native closure into a signed APK or App Bundle, with Java, Kotlin and Maven libraries. dist-apk
deps-vcpkg mcpp.deps.vcpkg 2026.9.28.3 Installs a vcpkg.json manifest as an action with the toolset mcpp resolved, and maps the prefix into the build. deps
deps-cmake mcpp.deps.cmake 2026.9.28.3 Builds and installs a CMake subproject as an action with Ninja and the toolset mcpp resolved, keeps the installation for any build with the same key, and maps the prefix into the build. deps
deps-archive mcpp.deps.archive 2026.9.26.2 Extracts a zip archive the project keeps and places its tree beside the program. deps

Some features add a sub-capability to a member: dist-apk-kotlin and dist-apk-maven (Kotlin sources, a Maven graph), and deps, which the deps members imply.

The general library (0.17.0). plugins-core gives a build program mcpp.plugins.declare, mcpp.plugins.toolset (the resolved toolchain, translated for a foreign build system) and mcpp.plugins.fs (deterministic file generation and placement). Every member implies it; a build program that uses only these modules, and a third-party plugin built on them, name it on the dependency edge. plugins-testing adds mcpp.plugins.testing, which runs a plugin function against a stated build context and compares what it declared. Both need mcpp 2026.9.28.3. surface, the name of plugins-core before 0.17.0, is kept until 2027-03-28. A feature states a mechanism and the tools that mechanism runs; the libraries and SDKs a program links are the project's declaration (0.15.0 removed rules-qt-xim*; see rules-qt).

Layout

mcpp.toml            the package: one feature per member
src/plugins.cppm     export module mcpp.plugins;  the version, mcpp::plugins::surface
                     (the declarations a consumer names) and mcpp::plugins::xml
src/declare.cppm,    the general library for build programs (`plugins-core`):
src/toolset.cppm,    mcpp.plugins.declare, mcpp.plugins.toolset, mcpp.plugins.fs
src/fs.cppm
src/testing.cppm     mcpp.plugins.testing (`plugins-testing`)
src/compat/, deps/compat/
                     compatibility units, each retired on the date its header states
rules/<x>.cppm       export module mcpp.rules.<x>;
tools/<x>.cppm       export module mcpp.tools.<x>;
dist/<x>.cppm        export module mcpp.dist.<x>;
deps/<x>.cppm        export module mcpp.deps.<x>;  deps/deps.cppm is shared
tests/<consumer>/    one project per member, built by CI with the pinned mcpp
docs/                one page per member or group of members

Adding a member

A member is one module file, one feature in mcpp.toml, a consumer under tests/ that CI builds and asserts on, a row in the table above with its mcpp floor, and a version bump. The conventions a member follows -- the same for a third-party or a project's own plugin -- are in docs/plugin-development.md; the division between what the engine owns and what the member owns is in docs/engine-and-rules.md.

Releases

A tag v<version> publishes the source archive; the index descriptor (mcpp-index/pkgs/m/mcpp.plugins.lua) names the GitHub archive and its GitCode mirror with one sha256.

About

Official mcpp build plugins: rule packages under mcpp.rules.*, build-time utilities under mcpp.tools.*, one package selected by features

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages