Github C++项目积累


lava/matplotlib-cpp - 2023-07-24

Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib

3.9k star

#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
int main() {
    plt::plot({1,3,2,4});
    plt::show();
}

Github C++项目积累_第1张图片


alibaba/yalantinglibs - 2023-07-17

A collection of C++20 libraries, include coro_rpc, struct_pack, struct_json, struct_xml, struct_pb, easylog, async_simple
854 star

yaLanTingLibs 是一个C++20基础工具库的集合, 现在它包括 struct_pack, struct_json, struct_xml, struct_pb, easylog, coro_rpc, coro_http 和 async_simple, 目前我们正在开发并添加更多的新功能。

yaLanTingLibs 的目标: 为C++开发者提供高性能,极度易用的C++20基础工具库, 帮助用户构建高性能的现代C++应用。


ipkn/crow - 2023-07-04

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
7.2k star

Github C++项目积累_第2张图片
Crow is C++ microframework for web. (inspired by Python Flask)

#include "crow.h"

int main()
{
    crow::SimpleApp app;

    CROW_ROUTE(app, "/")([](){
        return "Hello world";
    });

    app.port(18080).multithreaded().run();
}

contrem/arduino-timer - 2023-06-30

Non-blocking library for delaying function calls
260 star

/* Constructors */
/* Create a timer object with default settings:
   millis resolution, TIMER_MAX_TASKS (=16) task slots, T = void *
*/
Timer<> timer_create_default(); // auto timer = timer_create_default();

/* Create a timer with max_tasks slots and time_func resolution */
Timer<size_t max_tasks = TIMER_MAX_TASKS, unsigned long (*time_func)(void) = millis, typename T = void *> timer;
Timer<> timer; // Equivalent to: auto timer = timer_create_default()
Timer<10> timer; // Timer with 10 task slots
Timer<10, micros> timer; // timer with 10 task slots and microsecond resolution
Timer<10, micros, int> timer; // timer with 10 task slots, microsecond resolution, and handler argument type int

/* Signature for handler functions - T = void * by default */
bool handler(T argument);

/* Timer Methods */
/* Ticks the timer forward, returns the ticks until next event, or 0 if none */
unsigned long tick(); // call this function in loop()

/* Calls handler with opaque as argument in delay units of time */
Timer<>::Task
in(unsigned long delay, handler_t handler, T opaque = T());

/* Calls handler with opaque as argument at time */
Timer<>::Task
at(unsigned long time, handler_t handler, T opaque = T());

/* Calls handler with opaque as argument every interval units of time */
Timer<>::Task
every(unsigned long interval, handler_t handler, T opaque = T());

/* Cancel a timer task */
bool cancel(Timer<>::Task &task);
/* Cancel all tasks */
void cancel();

/* Returns the ticks until next event, or 0 if none */
unsigned long ticks();

/* Number of active tasks in the timer */
size_t size() const;

/* True if there are no active tasks */
bool empty() const;

Simple non-blocking timer library for calling functions in / at / every specified units of time. Supports millis, micros, time rollover, and compile time configurable number of tasks.


pybind/pybind11 - 2023-06-06

Seamless operability between C++11 and Python
12.9k star

Github C++项目积累_第3张图片

pybind11 可实现 C++11 和 Python 之间的无缝操作。

pybind11 是一个轻量级的只包含一组头文件的 C++ 库,可以在 Python 中使用 C++ 类型。主要用于创建已有 C++ 代码的 Python 封装版本。其目的和语法类似于 Boost.Python 库。为什么要创建这个项目的原因就是因为 Boost 。作者认为 Boost 很大很复杂。而目前的 C++11 兼容的编译器使用已经非常广泛,所以希望开发一个更轻量级更具备兼容性的项目。

除去注释之外,该项目的核心头文件只有 2500 行左右代码,依赖于 Python (2.7 或者 3.x) 和标准 C++ 库。这么精简的实现有赖于新的 C++11 语言特性。特别是元组、Lambda 函数以及可变模板。自从项目创建以来,其增长已经超过了 Boost.Python。


include-what-you-use/include-what-you-use - 2023-06-02

A tool for use with clang to analyze #includes in C and C++ source files
3.4k star

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

int main(int argc, char* argv[])
{
    return 0;
}

Github C++项目积累_第4张图片

A tool for use with clang to analyze #includes in C and C++ source files


leafsr/gcc-poison - 2023-06-02

find unsafe C/C++ functions
183 star

#include 
#include 
#include "gcc-poison.h"

int main(int argc, char *argv[]) {
   char buf[10];
   strcpy(buf, argv[1]);
   return 0;
}

$ gcc -o 2 2.c
1.c: In function ‘main’:
1.c:8:2: error: attempt to use poisoned "strcpy"

gcc-poison is a simple header file for developers to ban unsafe C/C++ functions from applications. It uses the #pragma GCC poison directive to define a number of identifiers (function names) as unsafe. Compilation will fail if these are present in your code.


aantron/better-enums - 2023-06-02

C++ compile-time enum to string, iteration, in a single header file
1.5k star

Github C++项目积累_第5张图片


sheredom/subprocess.h - 2023-04-24

single header process launching solution for C and C++
850 star

A simple one header solution to launching processes and interacting with them for C/C++.


ThomasMonkman/filewatch- 2023-03-27

File watcher in c++
244 star

filewatch::FileWatch<std::wstring> watch(
	L"C:/Users/User/Desktop/Watch/Test"s, 
	[](const std::wstring& path, const filewatch::Event change_type) {
		std::wcout << path << L"\n";
	}
);

Single header folder/file watcher in C++11 for windows and linux, with optional regex filtering


yuesong-feng/30dayMakeCppServer - 2022-11-27

30天自制C++服务器,包含教程和源代码
1.8k star

30天自制C++服务器。


chengxumiaodaren/cpp-learning - 2022-09-05

C++学习平台
1.7k star

致力于搭建一个最好的C++学习平台。


qicosmos/rest_rpc - 2022-08-25

modern C++(C++11), simple, easy to use rpc framework
1.1k star

rest_rpc是一个高性能、易用、跨平台、header only的c++11 rpc库,它的目标是让tcp通信变得非常简单易用,即使不懂网络通信的人也可以直接使用它。它依赖header-only的standalone asio(commit id:f70f65ae54351c209c3a24704624144bfe8e70a3)


dmlc/ps-lite - 2022-08-13

A lightweight parameter server interface
1.4k star

A light and efficient implementation of the parameter server framework. It provides clean yet powerful APIs. For example, a worker node can communicate with the server nodes by

  • Push(keys, values): push a list of (key, value) pairs to the server nodes
  • Pull(keys): pull the values from servers for a list of keys
  • Wait: wait untill a push or pull finished.

shell/Shell.h - 2022-08-04

linux上对执行shell命令的简单封装。


taskflow/taskflow - 2022-08-01

A General-purpose Parallel and Heterogeneous Task Programming System
7.1k star

Github C++项目积累_第6张图片

Taskflow helps you quickly write parallel and heterogeneous task programs in modern C++.


ChunelFeng/CGrap - 2022-08-01

312 star

本工程实现了一套无任何第三方依赖的跨平台图流程计算框架。通过GPipeline(流水线)底层调度,实现了依赖元素依次顺序执行、非依赖元素并发执行的调度功能。

使用者只需继承GNode(节点)类,实现子类的run()方法,并根据需要设定依赖关系,即可实现任务的图化执行。

同时,使用者还可以通过设定各种包含多节点信息的GGroup(组),自行控制图的条件判断、循环和并发执行逻辑。

此外,还可以通过添加GAspect(切面)的方式,实现以上各种元素功能的横向扩展,或是通过引入各种GAdapter(适配器)对单个节点功能进行加强。

Github C++项目积累_第7张图片


eliaskosunen/scnlib - 2022-07-26

scanf for modern C++
575 star

#include 
#include 

int main() {
    int i;
    // Read an integer from stdin
    // with an accompanying message
    scn::prompt("What's your favorite number? ", "{}", i);
    printf("Oh, cool, %d!", i);
}

// Example result:
// What's your favorite number? 42
// Oh, cool, 42!

scnlib is a modern C++ library for replacing scanf and std::istream. This library attempts to move us ever so closer to replacing iostreams and C stdio altogether. It’s faster than iostream (see Benchmarks) and type-safe, unlike scanf. Think {fmt} but in the other direction.


p-ranav/csv2 - 2022-07-18

Fast CSV parser and writer for Modern C++
286 star

#include 

int main() {
  csv2::Reader<delimiter<','>, 
               quote_character<'"'>, 
               first_row_is_header<true>,
               trim_policy::trim_whitespace> csv;
               
  if (csv.mmap("foo.csv")) {
    const auto header = csv.header();
    for (const auto row: csv) {
      for (const auto cell: row) {
        // Do something with cell value
        // std::string value;
        // cell.read_value(value);
      }
    }
  }
}

sebastiandev/zipper - 2022-07-12

C++ wrapper around minizip compression library
393 star

Github C++项目积累_第8张图片

Zipper’s goal is to bring the power and simplicity of minizip to a more object oriented/c++ user friendly library. It was born out of the necessity of a compression library that would be reliable, simple and flexible. By flexibility I mean supporting all kinds of inputs and outputs, but specifically been able to compress into memory instead of been restricted to file compression only, and using data from memory instead of just files as well.

.


mortennobel/cpp-cheatsheet - 2022-07-11

Modern C++ Cheatsheet.
1.6k star

C++ QUICK REFERENCE / C++ CHEATSHEET.


renatoGarcia/icecream-cpp - 2022-07-10

Never use cout/printf to debug again
385 star

IceCream-Cpp is a little (single header) library to help with the print debugging on C++11 and forward.

auto my_function(int i, double d) -> void
{
    IC();
    if (condition)
        IC();
    else
        IC();
}
ic| test.cpp:34 in "void my_function(int, double)"
ic| test.cpp:36 in "void my_function(int, double)"

ithewei/libhv - 2022-07-08

比libevent、libuv更易用的网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket/MQTT client/server.
4.3k star

Like libevent, libev, and libuv, libhv provides event-loop with non-blocking IO and timer, but simpler api and richer protocols.


abseil/abseil-cpp - 2022-07-04

Abseil Common Libraries (C++)
10.6k star

The repository contains the Abseil C++ library code. Abseil is an open-source collection of C++ code (compliant to C++11) designed to augment the C++ standard library.


facebook/folly - 2022-06-30

An open-source C++ library developed and used at Facebook
22.4k star

Facebook 开源的 C++ 工具库。包含一系列高性能的 C++ 组件库,方便且高效在 Facebook 内部被广泛应用。该项目不仅代码规范测试用例充足,而且源码中包含丰富的注释。同样功能的函数为什么别人写的性能好还健壮,这次终于可以一探究竟了。


martinmoene/any-lite - 2022-06-22

any lite - A C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later in a single-file header-only library
105 star

any-lite: A single-file header-only version of a C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later.


sheredom/utf8.h - 2022-06-17

single header utf8 string functions for C and C++
1.2k star

A simple one header solution to supporting utf8 strings in C and C++.

cginternals/cppfs - 2022-06-16

Cross-platform C++ file system library supporting multiple backends
367 star

#include 
#include 

using namespace cppfs;

void openFile(const std::string & filename)
{
    FileHandle fh = fs::open(filename);

   	if (fh.isFile())      { /* File ... */ }
    else if (fh.isDirectory()) { /* Directory ... */ }
    else if (!fh.exists())     { /* Not there ... */ }
}

cppfs is a cross-platform C++ library that provides an object-oriented abstraction for working with files and the file system.


martinmoene/optional-lite - 2022-06-07

optional lite - A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library
345 star

A single-file header-only version of a C++17-like optional, a nullable object for C++98, C++11 and later.

#include "nonstd/optional.hpp"

#include 
#include 

using nonstd::optional;
using nonstd::nullopt;

optional<int> to_int( char const * const text )
{
    char * pos = NULL;
    const int value = strtol( text, &pos, 0 );

    return pos == text ? nullopt : optional<int>( value );
}

int main( int argc, char * argv[] )
{
    char const * text = argc > 1 ? argv[1] : "42";

    optional<int> oi = to_int( text );

    if ( oi ) std::cout << "'" << text << "' is " << *oi;
    else      std::cout << "'" << text << "' isn't a number";
}

Cylix/cpp_redis - 2022-06-01

C++11 Lightweight Redis client
965 star

Github C++项目积累_第9张图片

cpp_redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations, pipelining, sentinels and high availability.


RedisJSON/RedisJSON - 2022-05-30

a JSON data type for Redis
3.2k star

RedisJSON is a Redis module that implements ECMA-404 The JSON Data Interchange Standard as a native data type. It allows storing, updating and fetching JSON values from Redis keys (documents).


eradman/entr - 2022-05-27

Run arbitrary commands when files change
2k star

A utility for running arbitrary commands when files change. Uses kqueue(2) or inotify(7) to avoid polling. entr was written to make rapid feedback and automated testing natural and completely ordinary.


gulrak/filesystem - 2022-05-26

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD
883 star

This is a header-only single-file std::filesystem compatible helper library, based on the C++17 and C++20 specs, but implemented for C++11, C++14, C++17 or C++20 (tightly following the C++17 standard with very few documented exceptions).


eranpeer/FakeIt - 2022-05-25

C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking
959 star

C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking.


martinus/nanobench - 2022-05-25

Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20
746 star

ankerl::nanobench is a platform independent microbenchmarking library for C++11/14/17/20.


doctest/doctest - 2022-05-25

The fastest feature-rich C++11/14/17/20/23 single-header testing framework
3.9k star

doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of magnitude) and runtime compared to other feature-rich alternatives. It brings the ability of compiled languages such as D / Rust / Nim to have tests written directly in the production code thanks to a fast, transparent and flexible test runner with a clean interface.

这是一款轻量级、快速的 C++ 测试框架,它使用起来十分方便,引入头文件即可使用,而且速度快、编译时间短,支持 C++ 11/14/17/20。


r-lyeh-archived/sole - 2022-05-25

Sole is a lightweight C++11 library to generate universally unique identificators (UUID), both v1 and v4
242 star

Sole is a lightweight C++11 library to generate universally unique identificators (UUID).


p-ranav/tabulate - 2022-05-23

able Maker for Modern C++
1.3k star

Github C++项目积累_第10张图片


jbeder/yaml-cpp - 2022-05-20

A YAML parser and emitter in C++
3.3k star

yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.


effolkronium/random - 2022-05-19

Random for modern C++ with convenient API
676 star

Random for modern C++ with convenient API(header only).


ericcurtin/glob_match - 2022-05-12

A header that can be used to match patterns
1 star

A header that can be used to match patterns. Portable accross Linux/Unix/Windows. It’s a subset of !fnmatch(pat, str, FNM_CASEFOLD) functionality.


nlohmann/fifo_map - 2022-05-07

a FIFO-ordered associative container for C++
124 star

a FIFO-ordered associative container for C++.


AnthonyCalandra/modern-cpp-features - 2022-04-09

A cheatsheet of modern C++ language and library features
13.8k star

C++20/17/14/11


caozhiyi/CppNet - 2022-04-09

Cross platform network library with C++11
646 star

Cppnet is a proactor mode and multithreaded network with C++11 on tcp. Support Window, Linux and macOS.


jobbole/awesome-c-cn#frameworks - 2022-04-07

C 资源大全中文版,包括了:构建系统、编译器、数据库、加密、初中高的教程/指南、书籍、库等
5.5k star

C 语言资源大全中文版

我想很多程序员应该记得 GitHub 上有一个 Awesome:XXX 系列的资源整理。awesome-c 是 koz.ross 发起维护的 C 语言资源列表,内容包括了:构建系统、编译器、数据库、加密、初中高的教程/指南、书籍、库等等。

Awesome 系列虽然挺全,但基本只对收录的资源做了极为简要的介绍,如果有更详细的中文介绍,对相应开发者的帮助会更大。这也是我们发起这个开源项目的初衷。


libcpr/cpr - 2022-04-07

C++ Requests: Curl for People, a spiritual port of Python Requests
4.5k star

C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.


Tencent/libco - 2022-04-07

libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013
7k star

Libco is a c/c++ coroutine library that is widely used in WeChat services. It has been running on tens of thousands of machines since 2013.


lzpong/threadpool - 2022-04-02

based on C++11 , a mini threadpool , accept variable number of parameters 基于C++11的线程池,简洁且可以带任意多的参数
577 star

based on C++11 , a mini threadpool , accept variable number of parameters. 基于C++11的线程池,简洁且可以带任意多的参数

管理一个任务队列,一个线程队列,然后每次取一个任务分配给一个线程去做,循环往复。 有意思的是,限制只创建一个线程,这样就是一个完全的任务队列了。


fmtlib/fmt - 2022-03-29

A modern formatting library
13.8k star

#include 
#include 

int main() {
  std::vector<int> v = {1, 2, 3};
  fmt::print("{}\n", v);
}

{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.


sogou/srpc - 2022-02-21

High performance, low latency, lightweight enterprise-level RPC system. Supports Baidu bRPC, Tencent tRPC, thrift protocols
1.2k star

SRPC is an RPC system developed by Sogou.


yedf2/handy - 2022-02-21

简洁易用的C++11网络库 / 支持单机千万并发连接 / a simple C++11 network server framework
3.9k star

A C++11 non-blocking network library


pulzed/mINI - 2022-02-17

INI file reader and writer
153 star

This is a tiny, header only C++ library for manipulating INI files. with read and write.


loentar/ngrest - 2022-02-05

Fast and easy C++ RESTful WebServices framework
412 star

ngrest is a simple C++ REST framework. It has small footprint, fast and very easy in use.

ngrest allow you to deploy C++ RESTful webservices under Apache2, Nginx or under simple ngrest http server.

ngrest is written on C++11 and uses CMake for build.


redis/redis - 2022-01-24

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
51.4k star

Redis is often referred to as a data structures server. What this means is that Redis provides access to mutable data structures via a set of commands, which are sent using a server-client model with TCP sockets and a simple protocol. So different processes can query and modify the same data structures in a shared way.


protocolbuffers/protobuf - 2022-01-20

Protocol Buffers - Google’s data interchange format
53.6k star

Protocol Buffers (a.k.a., protobuf) are Google’s language-neutral, platform-neutral, extensible mechanism for serializing structured data.


dquist/EventBus - 2022-01-12

A lightweight synchronous event framework for C++11
211 star


seleznevae/libfort - 2022-01-11

C/C++ library to create formatted ASCII tables for console applications
354 star

Github C++项目积累_第11张图片

libfort is a simple crossplatform library to create formatted text tables.


dbcli/mycli - 2021-12-20

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting
10.2k star

A command line client for MySQL that can do auto-completion and syntax highlighting.


stedolan/jq - 2021-12-20

Command-line JSON processor
21.6k star

jq is a lightweight and flexible command-line JSON processor.


google/googletest/ - 2021-12-17

GoogleTest - Google Testing and Mocking Framework
25.5k star

googletest 是一个由 Google 开发的C++测试框架,可用来编写单元测试。


Dobiasd/FunctionalPlus - 2021-11-29

Functional Programming Library for C++. Write concise and readable C++ code
1.6k star

helps you write concise and readable C++ code.


p-ranav/indicators - 2021-11-29

Activity Indicators for Modern C++
2.5k star

Thread-safe progress bars and spinners.

Github C++项目积累_第12张图片


p-ranav/awesome-hpp - 2021-11-29

A curated list of awesome header-only C++ libraries
1.8k star


/rigtorp/awesome-modern-cpp - 2021-11-29

**A collection of resources on modern C++** 9.1k star`

The goal is to collect a list of resources to help people learn about and leverage modern C++11 and beyond.


benhoyt/inih - 2021-11-24

Simple .INI file parser in C, good for embedded systems
1.7k star

inih (INI Not Invented Here) is a simple .INI file parser written in C. It’s only a couple of pages of code, and it was designed to be small and simple, so it’s good for embedded systems.


hoxu/gitstats - 2021-11-24

git history statistics generator
1.3k star

GitStats is a statistics generator for git (a distributed revision control system) repositories. It examines the repository and produces some interesting statistics from the history of it. Currently HTML is the only output format.


AlDanial/cloc - 2021-11-24

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages
13.8k star

Count Lines of Code.

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.


gflags/gflags - 2021-11-23

The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used
2.3k star

The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used。


Squadrick/shadesmar - 2021-11-20

Fast C++ IPC using shared memory
291 star

An IPC library that uses the system’s shared memory to pass messages. Supports publish-subscribe and RPC (under development).


agauniyal/rang - 2021-11-20

A Minimal, Header only Modern c++ library for terminal goodies ✨
1.2k star

Github C++项目积累_第13张图片

Colors for your Terminal.


JieweiWei/md5 - 2021-11-15

用C++实现md5加密算法
280 star

用c++实现md5算法。


jarro2783/cxxopts - 2021-11-03

Lightweight C++ command line option parser
3k star

int main(int argc, char** argv)
{
    cxxopts::Options options("test", "A brief description");

    options.add_options()
        ("b,bar", "Param bar", cxxopts::value<std::string>())
        ("d,debug", "Enable debugging", cxxopts::value<bool>()->default_value("false"))
        ("f,foo", "Param foo", cxxopts::value<int>()->default_value("10"))
        ("h,help", "Print usage")
    ;

    auto result = options.parse(argc, argv);

    if (result.count("help"))
    {
      std::cout << options.help() << std::endl;
      exit(0);
    }
    bool debug = result["debug"].as<bool>();
    std::string bar;
    if (result.count("bar"))
      bar = result["bar"].as<std::string>();
    int foo = result["foo"].as<int>();

    return 0;
}

This is a lightweight(head only) C++ option parser library, supporting the standard GNU style syntax for options.


99x/timercpp - 2021-11-03

Javascript like setTimeout and setInterval for c++ developers
184 star

Javascript like timer for c++ developers
This header only library has js equivalent setTimeout() and setInterval() for c++.


tkislan/base64 - 2021-10-27

Base64 encoding and decoding for C++ projects
66 star

A header only library for base64 with function of encode and decode


qinguoyi/TinyWebServer - 2021-10-18

Linux下C++轻量级WebServer服务器
6.1k star

Linux下C++轻量级Web服务器,助力初学者快速实践网络编程,搭建属于自己的服务器.


SRombauts/SQLiteCpp - 2021-10-17

SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper
1.4k star


sewenew/redis-plus-plus - 2021-10-15

Redis client written in C++
762 star

This is a C++ client library for Redis. It’s based on hiredis, and is compatible with C++ 17, C++ 14, and C++ 11.


SpartanJ/efsw - 2021-09-20

efsw is a C++ cross-platform file system watcher and notifier
198 star


coderyi/URLParser - 2021-09-15

an url parse/encode/decode tool
9 star

一个解析,Encode 和 Decode URL的小型C++库


yhirose/cpp-httplib - 2021-09-14

A C++ header-only HTTP/HTTPS server and client library
6.7k star

A C++11 single-file header-only cross platform HTTP/HTTPS library.


bombela/backward-cpp - 2021-09-07

A beautiful stack trace pretty printer for C++
2.3k star

Backward is a beautiful stack trace pretty printer for C++.


Neargye/nameof - 2021-09-07

Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
1.3k star

Header-only C++17 library provides nameof macros and functions to simply obtain the name of a variable, type, function, macro, and enum.


int2e/UrlEncoder - 2021-09-07

vc++ c++ cpp Encoder class( UrlEncode / UrlDecode / UTF8UrlEncode / UTF8UrlDecode)
10 star

urlencodeurldecode算法库,支持utf8、gb2312。


redis/hiredis - 2021-09-01

Minimalistic C client for Redis >= 1.2
2.3k star

Hiredis is a minimalistic C client library for the Redis database.


fffaraz/awesome-cpp - 2021-08-22

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-… stuff
36.5k star


p-ranav/pprint - 2021-08-22

Pretty Printer for Modern C++
846 star

一个让输出变得更漂亮的 C++ 库。就像 python 语言的 pprint 库,它对基本类型、字符串、复数、enum 类型、STL 容器等做了输出格式优化,有了缩紧和分行才更容易发现这个世界的美好。


chenshuo/muduo - 2021-08-22

Event-driven network library for multi-threaded Linux server in C++11
11.1k star

  __  __           _
 |  \/  |         | |
 | \  / |_   _  __| |_   _  ___
 | |\/| | | | |/ _` | | | |/ _ \
 | |  | | |_| | (_| | |_| | (_) |
 |_|  |_|\__,_|\__,_|\__,_|\___/

sharkdp/dbg-macro - 2021-08-22

A dbg(…) macro for C++
1.9k star

#include 
#include 

// You can use "dbg(..)" in expressions:
int factorial(int n) {
  if (dbg(n <= 1)) {
    return dbg(1);
  } else {
    return dbg(n * factorial(n - 1));
  }
}

int main() {
  std::string message = "hello";
  dbg(message);  // [example.cpp:15 (main)] message = "hello" (std::string)

  const int a = 2;
  const int b = dbg(3 * a) + 1;  // [example.cpp:18 (main)] 3 * a = 6 (int)

  std::vector<int> numbers{b, 13, 42};
  dbg(numbers);  // [example.cpp:21 (main)] numbers = {7, 13, 42} (std::vector)

  dbg("this line is executed");  // [example.cpp:23 (main)] this line is executed

  factorial(4);

  return 0;
}

Github C++项目积累_第14张图片

A macro for printf-style debugging fans.

Debuggers are great. But sometimes you just don’t have the time or patience to set up everything correctly and just want a quick way to inspect some values at runtime.

This projects provides a single header file with a dbg(…) macro that can be used in all circumstances where you would typically write printf(“…”, …) or std::cout << …. But it comes with a few extras.


p-ranavindicators - 2021-08-22

Activity Indicators for Modern C++
2.9k star

indicators是一个使用C++编写的进度条库,你可以用它在命令行中实现美观的进度条,它使用方便、线程安全、支持多种进度条样式.


mayerui/sudoku - 2021-08-22

C++实现的跨平台数独游戏,命令行操作易上手,可以在开发间隙用来放松身心。数百行代码,初学者也可以轻松掌握
419 star

C++ 实现的跨平台数独游戏,命令行操作易上手,可以在开发间隙用来放松身心。数百行代码,初学者也可以轻松掌握。 欢迎通过pull request的方式来添加功能或修复缺陷。


JakubVojvoda/design-patterns-cpp - 2021-08-22

C++ Design Patterns
2.4k star

Software design patterns are general reusable solutions to problems which occur over and over again in object-oriented design enviroment. It is not a finished design that can be transformed into source code directly, but it is template how to solve the problem. We can classify them by purpose into creational (abstract the instantiation process), structure (how classes and objects are composed to form larger structures) and behavioral patterns (the assignment of responsibilities between objects).


AnthonyCalandra/modern-cpp-features - 2021-08-22

A cheatsheet of modern C++ language and library features
13.8k star

Many of these descriptions and examples are taken from various resources (see Acknowledgements section) and summarized in my own words.


drogonframework/drogon - 2021-08-22

A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
7.3k star

#include 
using namespace drogon;
int main()
{
    app().setLogPath("./")
         .setLogLevel(trantor::Logger::kWarn)
         .addListener("0.0.0.0", 80)
         .setThreadNum(16)
         .enableRunAsDaemon()
         .run();
}

Drogon is a C++14/17-based HTTP application framework. Drogon can be used to easily build various types of web application server programs using C++. Drogon is the name of a dragon in the American TV series “Game of Thrones” that I really like.


sogou/workflow - 2021-08-22

C++ Parallel Computing and Asynchronous Networking Engine
7.6k star

#include 
#include "workflow/WFHttpServer.h"

int main()
{
    WFHttpServer server([](WFHttpTask *task) {
        task->get_resp()->append_output_body("Hello World!");
    });

    if (server.start(8888) == 0) { // start server on port 8888
        getchar(); // press "Enter" to end.
        server.stop();
    }

    return 0;
}

As Sogou`s C++ server engine, Sogou C++ Workflow supports almost all back-end C++ online services of Sogou, including all search services, cloud input method,online advertisements, etc., handling more than 10 billion requests every day. This is an enterprise-level programming engine in light and elegant design which can satisfy most C++ back-end development requirements.


ben-strasser/fast-cpp-csv-parser - 2021-08-22

Fast C++ CSV Parser
1.6k star

# include "csv.h"

int main(){
  io::CSVReader<3> in("ram.csv");
  in.read_header(io::ignore_extra_column, "vendor", "size", "speed");
  std::string vendor; int size; double speed;
  while(in.read_row(vendor, size, speed)){
    // do stuff with the data
  }
}

This is a small, easy-to-use and fast header-only library for reading comma separated value (CSV) files.


xyz347/xpack - 2021-08-22

convert json/xml/bson to c++ struct
331 star

#include 
#include "xpack/json.h" // Json包含这个头文件,xml则包含xpack/xml.h

using namespace std;

struct User {
    int id;
    string  name;
    XPACK(O(id, name)); // 添加宏定义XPACK在结构体定义结尾
};

int main(int argc, char *argv[]) {
    User u;
    string data = "{\"id\":12345, \"name\":\"xpack\"}";

    xpack::json::decode(data, u);          // json转结构体
    cout<<u.id<<';'<<u.name<<endl;

    string json = xpack::json::encode(u);  // 结构体转json
    cout<<json<<endl;

    return 0;
}

用于在C++结构体和json/xml之间互相转换。


progschj/ThreadPool - 2021-08-15

A simple C++11 Thread Pool implementation
5.3k star

// create thread pool with 4 worker threads
ThreadPool pool(4);

// enqueue and store future
auto result = pool.enqueue([](int answer) { return answer; }, 42);

// get result from future
std::cout << result.get() << std::endl;

jtilly/inih - 2021-08-09

This is a header only C++ version of inih
350 star

inih (INI Not Invented Here) is a simple .INI file parser written in C. It’s only a couple of pages of code, and it was designed to be small and simple, so it’s good for embedded systems.


c42f/tinyformat - 2021-08-09

Minimal, type safe printf replacement library for C++
453 star

tinyformat.h is a type safe printf replacement library in a single C++ header file. If you’ve ever wanted printf(“%s”, s) to just work regardless of the type of s, tinyformat might be for you.


gabime/spdlog - 2021-08-08

Fast C++ logging library
14.2k star

#include "spdlog/spdlog.h"

int main() 
{
    spdlog::info("Welcome to spdlog!");
    spdlog::error("Some error message with arg: {}", 1);
    
    spdlog::warn("Easy padding in numbers like {:08d}", 12);
    spdlog::critical("Support for int: {0:d};  hex: {0:x};  oct: {0:o}; bin: {0:b}", 42);
    spdlog::info("Support for floats {:03.2f}", 1.23456);
    spdlog::info("Positional args are {1} {0}..", "too", "supported");
    spdlog::info("{:<30}", "left aligned");
    
    spdlog::set_level(spdlog::level::debug); // Set global log level to debug
    spdlog::debug("This message should be displayed..");    
    
    // change log pattern
    spdlog::set_pattern("[%H:%M:%S %z] [%n] [%^---%L---%$] [thread %t] %v");
    
    // Compile time log levels
    // define SPDLOG_ACTIVE_LEVEL to desired level
    SPDLOG_TRACE("Some trace message with param {}", 42);
    SPDLOG_DEBUG("Some debug message");
}

Very fast, header-only/compiled, C++ logging library.


rapidxml - 2021-08-05

RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility. It is an in-situ parser written in modern C++, with parsing speed approaching that of strlen function executed on the same data.

还可以参考c++开源库rapidxml介绍与示例。


eidheim/Simple-Web-Server - 2021-08-05

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server.
2.3k star

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Asio (both Boost.Asio and standalone Asio can be used). Created to be an easy way to make REST resources available from C++ applications.


nlohmann/json - 2021-07-22

JSON for Modern C++
29.2k star

nlohmann库是C++解析json的库,库使用很简单。程序中使用nlohmann仅需要将json.hpp添加到工程中即可。

你可能感兴趣的:(其他,github,c++,开发语言)