Skip to content

About

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

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

63 Commits

Folders and files

Repository files navigation

mcpp-plugins

The official build plugins for mcpp — one plugin, one feature, one module.

ci Release License

English | 简体中文 · Documentation · mcpp · mcpp-index · Releases

mcpp is a general engine with a framework for build plugins; plugins come from this package (mcpp:plugins), from third parties, or from the project itself, and build.mcpp is where a project uses them: it imports the plugin's module under the name the plugin declares, configures it, and calls it. The edge is a [build-dependencies] entry — the library serves the build program, and the package never reaches the target.

Quick start

[build-dependencies.mcpp]
plugins = { version = "0.27.0", features = ["rules-spirv"] }
// 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;
}

Families

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 plugin; it states the collection's version

A third-party plugin names its modules mcpp.<its namespace>.*; core, plugins, deps, rules, dist, tools belong to this package and the engine. The full account of the families, and of how the engine routes a file to a rule, is in docs/00; where a tool a plugin runs comes from is in docs/02.

Plugins

feature what it does doc
rules-cuda Compiles CUDA (*.cu) through clang with an LLVM toolchain or nvcc with a GCC one. docs
rules-sycl Compiles SYCL (*.sycl) with DPC++. docs
rules-spirv Compiles GLSL and HLSL shader stages to SPIR-V and embeds or places the result. docs
rules-qt Runs moc, uic, rcc and Qt's Linguist tools as actions, links the Qt modules and places their runtime. docs
deps-vcpkg Installs a vcpkg.json manifest as an action with the toolset mcpp resolved, and maps the prefix into the build. docs
dist-apk Packs the native closure into a signed APK or App Bundle, with Java, Kotlin and Maven libraries. docs
All 23 plugins — feature, behaviour, doc; the modules and engine floors are in the documentation index
feature what it does doc
rules-ascendc Compiles Ascend C (*.asc) with BiSheng in mixed mode, so the object joins the ordinary link. docs
rules-cuda Compiles CUDA (*.cu) through clang with an LLVM toolchain or nvcc with a GCC one. docs
rules-hip Compiles HIP (*.hip) with the project's clang on the NVIDIA platform. docs
rules-metal Compiles .metal shaders into Metal libraries with the host's Xcode and deploys them beside the program. docs
rules-qt Runs moc, uic, rcc and Qt's Linguist tools as actions, links the Qt modules and places their runtime. docs
rules-qml Builds a QML application: each module's moc, qmltyperegistrar, qmlcachegen, rcc and qsb chain as actions, Qt's QML modules the program imports placed beside it, and a qt.conf. Implies rules-qt. docs
rules-slang Compiles Slang (*.slang) and embeds or places the result. docs
rules-spirv Compiles GLSL and HLSL shader stages to SPIR-V and embeds or places the result. docs
rules-swift Compiles a package's .swift sources into one module the C and C++ sources call. docs
rules-sycl Compiles SYCL (*.sycl) with DPC++. docs
tools-embed Writes a data file into a header the program compiles in. docs
tools-island Generates the extern "C" boundary and the C++ module of a code island. docs
tools-steps Describes an action whose work is more than one command as portable operations a backend runs; implied by dist-apk and dist-apple. docs
dist-appimage Turns the tree mcpp pack stages into an AppImage (Linux). docs
dist-deb Installs the staged tree under /opt/<name> with a launcher, a desktop entry and an icon, as a Debian package (Linux targets). docs
dist-rpm The same installation as an RPM package (Linux targets). docs
dist-wix Builds an MSI of the staged tree, and a Burn bundle chaining it (Windows). docs
dist-apple Lays out a macOS or iOS application bundle, signs it and writes a disk image. docs
dist-web Copies a wasm32-emscripten program and its files into a web directory with an index.html. docs
dist-apk Packs the native closure into a signed APK or App Bundle, with Java, Kotlin and Maven libraries. docs
deps-vcpkg Installs a vcpkg.json manifest as an action with the toolset mcpp resolved, and maps the prefix into the build. docs
deps-cmake Builds and installs a CMake subproject as an action with Ninja and the toolset mcpp resolved, and maps the prefix into the build. docs
deps-archive Extracts a zip archive the project keeps and places its tree beside the program. docs

Contributing and maintenance

The project is maintained mainly by @Sunrisepeak — its upkeep and growth need more contributors and maintainers. If some plugins interest you and you want to contribute and maintain, start from the simple and from what interests you: use them, introduce and teach them, report issues, fix bugs, improve them, maintain one or more of them:

Maintainers

maintainer plugins primarily maintained
@Sunrisepeak primary maintainer of the project
apply to become a maintainer which plugins the repository takes, what the role is, and how to apply

About

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

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages