mcpp index

mcpplibs.cmdline

import

A simple command-line parsing library/framework for modern C++

import mcpplibs.cmdline;

模組名讀自上游 src/cmdline.cppm 裡的 `export module` 宣告。

mcpp add mcpplibs.cmdline@0.1.0

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// Consuming `mcpplibs.cmdline` through the published index.
//
// `parse_from` rather than `run(argc, argv)`: a test whose only assertion is
// "it linked" passes for a package that parses nothing. Parsing a string and
// checking what came out is the difference between testing the dependency
// edge and testing the dependency.
//
// The chains end in `.end()`, which is what commits the pending item and
// hands back the App — a builder is not an App, and the compiler says so.
import std;
import mcpplibs.cmdline;

using namespace mcpplibs;

int main() {
    int failures = 0;
    auto check = [&](bool ok, std::string_view what) {
        if (!ok) { std::println("FAIL: {}", what); ++failures; }
    };

    auto app = cmdline::App("tool")
        .version("1.0")
// …

tests/examples/cmdline/tests/consume.cpp · 專案 tests/examples/cmdline

openkal

目標結果環境測試專案首條診斷
aarch64-linux-muslrunsposixcmdline
x86_64-linux-gnurunsposixcmdline
x86_64-linux-muslrunsposixcmdline
x86_64-windows-muslfailscmdlineerror: openkal-llvm-runtime is requested as '0.15.2' by cmdline-tests, and the platform openkal-platform 0.32.1 is a version group

測量方式

2026-11-29 由 tests/openkal/compat.py 測得,使用 openkal-llvm-runtime 0.15.2、llvm@22.1.8、mcpp 2026.11.23.1。測試專案沒有自行選擇平台相依。 上方徽章是所有已測目標裡最嚴格那個的結果 —— 上表列出每個目標各自的環境。

建置 · 上游資訊清單

modules
mcpplibs.cmdline
targets
cmdline (lib)
manifest version
0.1.0
來源
https://raw.githubusercontent.com/mcpplibs/cmdline/v0.1.0/mcpp.toml

版本

版本平台 鏡像sha256
0.1.0 最新 LinuxWindowsmacOS 來源 2167b41288d7…
0.0.7 LinuxWindowsmacOS CN GLOBAL 2e998d70953c…
0.0.6 LinuxWindowsmacOS CN GLOBAL 24716d498f29…
0.0.5 LinuxWindowsmacOS CN GLOBAL a8fad9858ffa…
0.0.4 LinuxWindowsmacOS CN GLOBAL 8428e829bec2…
展開全部 8 個版本
0.0.3 LinuxWindowsmacOS CNGLOBAL a7854898e083…
0.0.2 LinuxWindowsmacOS CNGLOBAL 4f3e2b8dc4d9…
0.0.1 LinuxWindowsmacOS CNGLOBAL 3fb2f5495c1a…