mcpp index

compat.curl

#include

libcurl — client-side URL transfer library (static, OpenSSL/Schannel TLS)

#include <curl/curl.h>
mcpp add compat.curl@8.21.0

Usage

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

// Behavioral test — verify compat.curl builds a usable libcurl with working
// TLS, without touching the network.
//
// CI runners have no reliable outbound network and the index's other members
// never assume one, so nothing here opens a connection. What is asserted
// instead is everything that a misconfigured build actually gets wrong:
//
//   * the library initialises at all (curl_global_init walks the same setup
//     path a real transfer would),
//   * the TLS backend is really compiled in — a curl built with no SSL still
//     links and still runs, it just silently cannot do https, which is exactly
//     the failure EUI-NEO's `network` feature would hit at runtime,
//   * https and http are among the supported protocols,
//   * a handle can be configured with the options EUI-NEO actually sets.
#include <curl/curl.h>
import std;

// CURL_STATICLIB must arrive from the PACKAGE, not from this project. Without
// it <curl/curl.h> declares everything __declspec(dllimport) and the Windows
// link fails against a static archive; on other platforms it is inert, so this
// compile-time check is the only thing that catches a regression early.
static_assert([] {
// …

tests/examples/curl/tests/transfer.cpp · project tests/examples/curl

Build

targets
curl (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/include, */lib, mcpp_generated

Features

featuredeclares
defaultimplies
staticlibdefines

Sources (7)

  • */lib/*.c
  • !*/lib/dllmain.c
  • */lib/curlx/*.c
  • */lib/vauth/*.c
  • */lib/vquic/*.c
  • */lib/vssh/*.c
  • */lib/vtls/*.c

Generated files

  • mcpp_generated/curl_config.h

Versions

VersionPlatforms Mirrorssha256
8.21.0 latest LinuxWindowsmacOS CN GLOBAL ec753aa6f408…