PEGTL VS cpp-httplib

Compare PEGTL vs cpp-httplib and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
PEGTL cpp-httplib
12 38
1,867 11,806
1.5% -
7.2 8.7
2 days ago 6 days ago
C++ C++
Boost Software License 1.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

PEGTL

Posts with mentions or reviews of PEGTL. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-06.
  • Show HN: Matcheroni, a tiny C++20 header library for building lexers/parsers
    4 projects | news.ycombinator.com | 6 Jul 2023
    Very cool, and I like the name!

    I'd be interested in reading about how Matcheroni compares with PEGTL and Lexy.

    https://github.com/taocpp/PEGTL

  • Use PEGTL to remove my clunky homemade parser
    2 projects | dev.to | 30 Jan 2023
    I found a library I wanted to test: Pegtl
  • What are some cool modern libraries you enjoy using?
    32 projects | /r/cpp | 18 Sep 2022
    I like PEGTL
  • Are C/C++ developers allowed to import libraries to make coding easier or are they expected to build every functions and methods from scratch (without importing anything like String.h)?
    1 project | /r/learnprogramming | 17 Jun 2022
    Sure - libraries that are expected to be entirely self-contained. The one that comes to mind is PEGTL, a parser combinator library that is intended to be embedded inside a larger program. Making it import more dependencies would break this philosophy. Similarly, in the Rust world, there are a variety of "no-std" crates that should be able to be imported even if the standard library is not available on the target platform.
  • TIL: Visual Studio has quantum state values 🤨
    1 project | /r/cpp | 17 Mar 2022
    The program in the post was just an example meant to illustrate the problem. Originally, this (new) behavior of MSVC broke my code in the PEGTL, see [this commit](https://github.com/taocpp/PEGTL/commit/e3c8cb499dc3d1d76d23f2d5d79469dcb15550c5) that I needed to apply to fix it.
  • We Built a C++ Rendering Engine for the Web
    2 projects | news.ycombinator.com | 10 Jul 2021
    As a professional C++ programmer I feel a lot of the reasons C++ gets this response is because it's simply not "batteries included" like Go or Rust.

    C++ is a very powerful, unopinionated language, that gives you a lot of freedom to attack your problem domain the way you best see fit.

    If you're writing a networked application, don't use POSIX sockets, go and find a higher level library. If you're parsing complex text formats, don't iterate over buffers with char*'s, go pick up PEGTL[0]. If you're working on graphs, or need to properly index in-memory data, go pick up Boost[1][2]. If you need a GUI, go pick up Qt.

    It's extremely common in C++, due to the lack of a universal package management solution, for people to try and "muddle through" and do shit themselves when it's far outside their core competency.

    At one of my last employers, the core product was parsing JSON with std::regex, simply because they couldn't be bothered to integrate a JSON library.

    [0] https://github.com/taocpp/PEGTL

    [1] https://www.boost.org/doc/libs/1_76_0/libs/graph/

    [2] https://www.boost.org/doc/libs/1_76_0/libs/multi_index/doc/i...

  • Is there anything like sly for C++?
    3 projects | /r/cpp | 1 Jul 2021
    You are looking for Boost.Spirit (https://www.boost.org/doc/libs/1_76_0/libs/spirit/doc/x3/html/index.html) or PEGTL (https://github.com/taocpp/PEGTL)
  • Why no more Lex/Yakk/ANTLR/whatever?
    5 projects | /r/cpp | 20 Jun 2021
    I personally prefer to use parsing combinator libraries in C++, where the "grammar" is just part of normal C++ and directly integrate. Examples are Boost.Spirit, pegtl, or (my own) lexy.
  • Rust's Most Unrecognized Contributor
    1 project | /r/rust | 2 May 2021
  • Wondered if anyone is interested in a c++ parser combinators library?
    1 project | /r/cpp | 13 Apr 2021
    While I'm not quite sure how this might transfer to your approach, with your Haskell-inspired style being quite different from our C++ templates, in the PEGTL our equivalent to your Char, which is called one, is variadic (true to the T in PEGTL a variadic template) and takes a list of possible matches.

cpp-httplib

Posts with mentions or reviews of cpp-httplib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-06.
  • Experience using crow as web server
    11 projects | /r/cpp | 6 Nov 2023
    Alternatives at the low to medium level of abstraction include civetweb and mongoose, which have a common ancestor. Both of these appear to be C rather than C++, but seem to be production quality and well-documented. Another C library is cpp-httplib, which is probably too low-level for me.
  • REST APIs using C++. (Is this even done much?)
    13 projects | /r/cpp | 29 Mar 2023
    I use this all the time to expose an admin rest interface to my public installations.
  • C++ websocket and HTTP client
    1 project | /r/cpp_questions | 14 Mar 2023
    I'm using this one: https://github.com/yhirose/cpp-httplib
  • Compiling CrowCPP on Windows and about to kms
    3 projects | /r/cpp | 8 Mar 2023
  • PocketPy: A Lightweight(~5000 LOC) Python Implementation in C++17
    8 projects | /r/cpp | 6 Feb 2023
    Every one of these libraries uses CMake to make it easier for end users to consume their libraries. In fact your example uses CMake as well such that I can consume it the way I describe above.
  • xbps-src ARM: glslangValidator: cannot execute binary file: Exec format error
    11 projects | /r/voidlinux | 5 Jan 2023
    # Template file for 'yuzu-mainline' pkgname=yuzu-mainline version=1295 revision=1 _cubeb_version=75d9d125ee655ef80f3bfcd97ae5a805931042b8 _sanitizers_cmake_version=aab6948fa863bc1cbe5d0850bc46b9ef02ed4c1a _dynarmic_version=bd570e093ca1d1206961296b90df65cda7de8e87 _sirit_version=d7ad93a88864bda94e282e95028f90b5784e4d20 _mbedtls_version=8c88150ca139e06aa2aae8349df8292a88148ea1 _xbyak_version=348e3e548ebac06d243e5881caec8440e249f65f _SDL_version=f17058b562c8a1090c0c996b42982721ace90903 _cpp_jwt_version=e12ef06218596b52d9b5d6e1639484866a8e7067 _cpp_httplib_version=305a7abcb9b4e9e349843c6d563212e6c1bbbf21 _Vulkan_Headers_version=00671c64ba5c488ade22ad572a0ef81d5e64c803 create_wrksrc=yes build_wrksrc=${pkgname}-mainline-0-${version} build_style=cmake configure_args="-DYUZU_CHECK_SUBMODULES=OFF -DYUZU_TESTS=OFF -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON" hostmakedepends="pkg-config qt5-host-tools qt5-qmake clang" makedepends="fmt-devel libenet-devel inih-devel libusb-devel liblz4-devel opus-devel zlib-devel libzstd-devel boost-devel qt5-devel qt5-multimedia-devel libva-devel ffmpeg-devel glslang-devel SPIRV-Headers catch2 json-c++ speexdsp-devel" short_desc="Nintendo Switch Emulator" maintainer="Owen Law " license="GPL-3.0-or-later" homepage="https://github.com/yuzu-emu/yuzu-mainline" changelog="${homepage}/releases/tag/mainline-0-${version}" distfiles="${homepage}/archive/refs/tags/mainline-0-${version}.tar.gz https://github.com/herumi/xbyak/archive/${_xbyak_version}.tar.gz https://github.com/MerryMage/dynarmic/archive/${_dynarmic_version}.tar.gz https://github.com/yuzu-emu/mbedtls/archive/${_mbedtls_version}.tar.gz https://github.com/mozilla/cubeb/archive/${_cubeb_version}.tar.gz https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_cmake_version}.tar.gz https://github.com/yuzu-emu/sirit/archive/${_sirit_version}.tar.gz https://github.com/libsdl-org/SDL/archive/${_SDL_version}.tar.gz https://github.com/arun11299/cpp-jwt/archive/${_cpp_jwt_version}.tar.gz https://github.com/yhirose/cpp-httplib/archive/${_cpp_httplib_version}.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/${_Vulkan_Headers_version}.tar.gz" checksum="b8b2616a24653352b8afd145ee46eb9ead07c6ef3aff8c0ff3a6225b381b4b85 fbe54fc881cdfb0876ddc8f29f74674a311ba7ae4b774751cb1b637c043e3bae 170530852547ee2f5517b0a12e643646e51a9974414084d389a85632df7c4518 8d3553ea5c3b47789c5a1a6437f948525d0a8ce2a0897000a36b511000c6bad4 8c5b7ca55ee586a3e5e63de2d31c319045f92e949140a734846a0d69ad342e2e 9f5b073625375322236a94ce8d2d803cdedad321c91e63845f487b9ebfb2c433 6612f924d1f2b2c7cb37effcda5d78550fad276887ee8f9bc391b9ecbf9e4a64 2a149e79712027d2d8141e3233df2f6679825b6f78237db3db72bc6cfc08b845 b4cc0e1f89d3c60a4dde74baa730a90de13c5dd5155b09d8dd34cd3205a6e758 61a97686b03edffa737c396f54e48da2ff0a04c3f6859ec9e80853aea6508030 99443e30caee5d2c0019de6549cc0c7c0432214494617da445753fc46374a7c3" post_extract() { mv "xbyak-${_xbyak_version}" xbyak cp -r xbyak "${build_wrksrc}/externals" mv "dynarmic-${_dynarmic_version}" dynarmic cp -r dynarmic "${build_wrksrc}/externals" mv "mbedtls-${_mbedtls_version}" mbedtls cp -r mbedtls "${build_wrksrc}/externals" mv "SDL-${_SDL_version}" SDL cp -r SDL "${build_wrksrc}/externals" mv "cubeb-${_cubeb_version}" cubeb mv "sanitizers-cmake-${_sanitizers_cmake_version}" sanitizers-cmake cp -r sanitizers-cmake cubeb/cmake cp -r cubeb "${build_wrksrc}/externals" mv "sirit-${_sirit_version}" sirit cp -r sirit "${build_wrksrc}/externals" mv cpp-jwt-${_cpp_jwt_version} cpp-jwt cp -r cpp-jwt ${build_wrksrc}/externals mv cpp-httplib-${_cpp_httplib_version} cpp-httplib cp -r cpp-httplib ${build_wrksrc}/externals mv Vulkan-Headers-${_Vulkan_Headers_version} Vulkan-Headers cp -r Vulkan-Headers ${build_wrksrc}/externals }
  • How to handle HTTPS - to dynamic link, or find a better solution?
    1 project | /r/cpp_questions | 29 Dec 2022
    Through development I've been making requests to my locally hosted sever using cpphttplib via HTTP and always had the intention of using HTTPS once my website was live. Not the smartest idea to leave this until the end, I know.
  • Why is there no simple http request/response library?
    1 project | /r/cpp_questions | 14 Dec 2022
    Have you tried searching the internet? https://github.com/yhirose/cpp-httplib
  • Issues with libssl on Mac
    1 project | /r/cpp_questions | 14 Nov 2022
    I'm new to C++, and have been trying to make a simple HTTP request. I stumbled on cpp-httplib and decided to try it out.
  • What are some cool modern libraries you enjoy using?
    32 projects | /r/cpp | 18 Sep 2022

What are some alternatives?

When comparing PEGTL and cpp-httplib you can also consider the following projects:

lexy - C++ parsing DSL

libcurl - A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features

cpp-peglib - A single file C++ header-only PEG (Parsing Expression Grammars) library

C++ REST SDK - The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

spirit - Boost.org spirit module

Crow - A Fast and Easy to use microframework for the web.

C++ B-tree - Git mirror of the official (mercurial) repository of cpp-btree

Boost.Beast - HTTP and WebSocket built on Boost.Asio in C++11

pybind11 - Seamless operability between C++11 and Python

cpr - C++ Requests: Curl for People, a spiritual port of Python Requests.

sparsepp - A fast, memory efficient hash map for C++

Restbed - Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.