mcpp index

yizhinailong.mcr

import

Modular C++23 HTTP client on libcurl — sync, async, coroutine and batch requests with typed responses

import mcr;

Module name read from the upstream `export module` declaration in src/mcr.cppm.

mcpp add yizhinailong.mcr@0.1.5

Usage

From this repository's own test project — built and run by CI, not written for the website.

// yizhinailong.mcr — prove the public module surface compiles, links and
// behaves. A live HTTP round trip is deliberately out of scope: it would need
// a local server plus the curl runtime, neither of which belongs in an index
// member. What is exercised here is everything that is observable offline —
// the generated version module, the status classifiers, the owned option
// types, and the Response JSON parsing path.

import std;
import mcr;

#ifndef MCR_EXPECT_VERSION
#define MCR_EXPECT_VERSION "0.1.5"
#define MCR_EXPECT_MAJOR 0
#define MCR_EXPECT_MINOR 1
#define MCR_EXPECT_PATCH 5
#endif

int main() {
    // mcr.version is generated by the package's own build.mcpp, read out of
    // its mcpp.toml. Asserting on it proves the build hook ran and the
    // generated module unit reached the library target.
    if (mcr::VERSION != MCR_EXPECT_VERSION) return 1;
// …

tests/examples/mcr/tests/api.cpp · project tests/examples/mcr

Build · upstream manifest

modules
mcr
targets
mcr (lib)
manifest version
0.1.5
dependencies
compat, nlohmann
source
https://raw.githubusercontent.com/yizhinailong/mcr/v0.1.5/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
0.1.5 latest LinuxWindowsmacOS source bd55e9dc19b6…