国外提供参考的c++ http lib or server 

​C++ REST SDK Alternatives - C++ Networking | LibHunt​

众所周知,C++ 并不是一种流行的 Web 开发语言,究其原因有很多:语言门槛高、使用难度大、开发效率低 ...... 话虽如此,​​但随着 Emscripten 的成熟,未来 C++ 在 Web 方面会发挥更大的潜能,​​尤其是游戏、3D 应用等方面。

c++ http server_github

有关 C++ Web 相关的框架有不少,下面进行了简单的整理,并​​按照“Star”的数量进行了排序,​​希望能对大家有所帮助。

1

Proxygen

Proxygen 是 Facebook 开发的一个 C++ 的 HTTP 库,包含一个易用的 HTTP 服务器。支持 HTTP/1.1、SPDY 3 和 SPDY 3.1,同时也开始在为 HTTP/2 做开发。

  • Star:6.8k
  • GitHub:https://github.com/facebook/proxygen

2

Crow

Crow 是一个非常快速和易于使用的 C++ 微型 Web 框架(灵感来自于 Python Flask)

  • Star:6k
  • GitHub:https://github.com/ipkn/crow

3

C++ REST SDK

C++ REST SDK 是微软发布的一个 C++ 客户端-服务器通信库,该库基于 Modern C++ 异步 API,开发者可以方便地连接并与服务交互。

  • Star:5.7k
  • 主页:https://microsoft.github.io/cpprestsdk/index.html
  • GitHub:https://github.com/microsoft/cpprestsdk
  • 文档:https://github.com/Microsoft/cpprestsdk/wiki

4

Drogon

Drogon 是一个基于 C++14/17 的 Http 应用框架,使用 Drogon 可以方便的使用 C++ 构建各种类型的 Web 应用服务端程序。

  • Star:3.7k
  • GitHub:https://github.com/an-tao/drogon

5

Oat++

Oat++ 是一个纯 C++ 实现的 Web 开发框架,高性能、简单的 API、跨平台、零依赖。

  • Star:3.1k
  • 主页:https://oatpp.io/
  • GitHub:https://github.com/oatpp/oatpp
  • 文档:https://oatpp.io/docs/start/

6

Pistache

Pistache 是一个现代而优雅的 C++ HTTP 和 REST 框架,完全采用纯 C++ 14 编写,并提供了一个清晰、友好的 API。

  • Star:2.2k
  • 主页:http://pistache.io/
  • GitHub:https://github.com/oktal/pistache/
  • 文档:http://pistache.io/guide/

7

Silicon

Silicon 是一个高性能、面向中间件的 C++ 14 http Web 框架。

  • Star:1.7k
  • 主页:http://siliconframework.org/
  • GitHub:https://github.com/matt-42/silicon/
  • 文档:http://siliconframework.org/docs/getting_started.html

8

Civetweb

CivetWeb 是一个易于使用、强大的、C/C++ 嵌入式 Web 服务器,带有可选的 CGI、SSL 和 Lua 支持。

  • Star:1.6k
  • GitHub:https://github.com/civetweb/civetweb
  • 文档:https://github.com/civetweb/civetweb/tree/master/docs

9

Wt

Wt 是 Modern C++ 中的一个 Web GUI 库。使用 widgets 快速开发具有高度交互性的 Web UI,而无需编写任何 JavaScript。Wt 为您处理所有请求处理和页面呈现,因此您可以专注于功能。

  • Star:1.1k
  • 主页:https://www.webtoolkit.eu/wt
  • GitHub:https://github.com/emweb/wt
  • 文档:https://www.webtoolkit.eu/wt/documentation

10

cinatra

cinatra 是一个高性能易用的 http 框架,它是用 modern c++(c++17) 开发的,它的目标是提供一个快速开发的 c++ http 框架。

  • Star:914
  • Github:https://github.com/qicosmos/cinatra

类似的框架还有很多,像 TreeFrog、Cutelyst、Tufão、C++ Web Framework (CWF) 、CppCMS、QDjango、QtWebApp ......