{"id":23679523,"url":"https://github.com/shiponcs/pistache","last_synced_at":"2026-02-13T21:33:12.203Z","repository":{"id":173328055,"uuid":"410966226","full_name":"shiponcs/pistache","owner":"shiponcs","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-26T08:55:02.000Z","size":649,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-10T23:10:41.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiponcs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-27T16:45:46.000Z","updated_at":"2023-03-09T02:50:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"81095fbc-2e85-4107-81ea-3cb3b3ca9f8a","html_url":"https://github.com/shiponcs/pistache","commit_stats":null,"previous_names":["shiponcs/pistache"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shiponcs/pistache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiponcs%2Fpistache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiponcs%2Fpistache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiponcs%2Fpistache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiponcs%2Fpistache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiponcs","download_url":"https://codeload.github.com/shiponcs/pistache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiponcs%2Fpistache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267972227,"owners_count":24174367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-29T17:43:35.854Z","updated_at":"2025-10-07T06:24:09.826Z","avatar_url":"https://github.com/shiponcs.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pistache\n[![N|Solid](pistache.io/static/img/logo.png)](https://www.github.com/pistacheio/pistache)\n\n[![Build Status](https://travis-ci.org/pistacheio/pistache.svg?branch=master)](https://travis-ci.org/pistacheio/pistache)\n\nPistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++14 and provides a clear and pleasant API.\n\n# Documentation\n\nWe are still looking for a volunteer to document fully the API. In the mean time, partial documentation is available at [http://pistache.io](http://pistache.io). If you are interested in helping with this, please open an issue ticket.\n\n# Dependencies\n\nPistache has the following third party dependencies\n\n- [CMake](https://cmake.org)\n- [Doxygen](https://www.doxygen.nl/)\n- [Googletest](https://github.com/google/googletest)\n- [OpenSSL](https://www.openssl.org/)\n- [RapidJSON](https://rapidjson.org/)\n\n# Contributing\n\nPistache is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). Contributors are welcome!\n\nPistache was originally created by Mathieu Stefani, but he is no longer actively maintaining Pistache. A team of volunteers has taken over. To reach the original maintainer, drop a private message to `@octal` in [cpplang Slack channel](https://cpplang.now.sh/).\n\nFor those that prefer IRC over Slack, the rag-tag crew of maintainers idle in `#pistache` on Freenode. Please come and join us!\n\nThe [Launchpad Team](https://launchpad.net/~pistache+team) administers the daily and stable Ubuntu pre-compiled packages.\n\n## Release Versioning\n\nPlease update `version.txt` accordingly with each unstable or stable release.\n\n## Interface Versioning\n\nThe version of the library's public interface (ABI) is not the same as the release version. The interface version is primarily associated with the _external_ interface of the library. Different platforms handle this differently, such as AIX, GNU/Linux, and Solaris.\n\nGNU Libtool abstracts each platform's idiosyncrasies away because it is more portable than using `ar(1)` or `ranlib(1)` directly. However, it is a pain to integrate with CMake so we made do without it by setting the SONAME directly.\n\nWhen Pistache is installed it will normally ship:\n- `libpistache-\u003crelease\u003e.so.X.Y`: This is the actual shared-library binary file. The _X_ and _Y_ values are the major and minor interface versions respectively.\n\n- `libpistache-\u003crelease\u003e.so.X`: This is the _soname_ soft link that points to the binary file. It is what other programs and other libraries reference internally. You should never need to directly reference this file in your build environment.\n\n- `libpistache-\u003crelease\u003e.so`: This is the _linker name_ entry. This is also a soft link that refers to the soname with the highest major interface version. This linker name is what is referred to on the linker command line. This file is created by the installation process.\n\n- `libpistache-\u003crelease\u003e.a`: This is the _static archive_ form of the library. Since when using a static library all of its symbols are normally resolved before runtime, an interface version in the filename is unnecessary.\n\nIf your contribution has modified the interface, you may need to update the major or minor interface versions. Otherwise user applications and build environments will eventually break. This is because they will attempt to link against an incorrect version of the library -- or worse, link correctly but with undefined runtime behaviour.\n\nThe major version should be incremented every time a non-backward compatible change occured in the ABI. The minor version should be incremented every time a backward compatible change occurs. This can be done by modifying `version.txt` accordingly.\n\n# Precompiled Packages\nIf you have no need to modify the Pistache source, you are strongly recommended to use precompiled packages for your distribution. This will save you time.\n\n## Debian and Ubuntu\nWe have submitted a [Request for Packaging](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929593) downstream to Debian. Once we have an official Debian package maintainer intimately familiar with the [Debian Policy Manual](https://www.debian.org/doc/debian-policy/), we can expect to eventually see it become available in Debian and all derivatives (e.g. Ubuntu and many others).\n\nBut until then currently Pistache has partially compliant upstream Debianization. Our long term goal is to have our source package properly Debianized downstream by a Debian Policy Manual SME. In the mean time consider using our PPAs to avoid having to build from source.\n\n### Supported Architectures\nCurrently Pistache is built and tested on a number of [architectures](https://wiki.debian.org/SupportedArchitectures). Some of these are suitable for desktop or server use and others for embedded environments. As of this writing we do not currently have any MIPS related packages that have been either built or tested. The `ppc64el` builds are occasionally tested on POWER9 hardware, courtesy of IBM.\n\n- amd64\n- arm64\n- armhf\n- i386\n- ppc64el\n- s390x\n\n### Ubuntu PPA (Unstable)\nThe project builds [daily unstable snapshots](https://launchpad.net/~pistache+team/+archive/ubuntu/unstable) in a separate unstable PPA. To use it, run the following:\n\n```console\n$ sudo add-apt-repository ppa:pistache+team/unstable\n$ sudo apt update\n$ sudo apt install libpistache-dev\n```\n\n### Ubuntu PPA (Stable)\nCurrently there are no stable release of Pistache published into the [stable](https://launchpad.net/~pistache+team/+archive/ubuntu/stable) PPA. However, when that time comes, run the following to install a stable package:\n\n```console\n$ sudo add-apt-repository ppa:pistache+team/stable\n$ sudo apt update\n$ sudo apt install libpistache-dev\n```\n\n## Other Distributions\nPackage maintainers, please insert instructions for users to install pre-compiled packages from your respective repositories here.\n\n# Use via pkg-config\n\nIf you would like to automatically have your project's build environment use the appropriate compiler and linker build flags, [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) can greatly simplify things. It is the portable international _de facto_ standard for determining build flags. The development packages include a pkg-config manifest.\n\n## GNU Autotools\nTo [use](https://autotools.io/pkgconfig/pkg_check_modules.html) with the GNU Autotools, as an example, include the following snippet in your project's `configure.ac`:\n\n```\n\n    # Pistache...\n    PKG_CHECK_MODULES(\n        [libpistache], [libpistache \u003e= 0.0.2], [],\n        [AC_MSG_ERROR([libpistache \u003e= 0.0.2 missing...])])\n    YOURPROJECT_CXXFLAGS=\"$YOURPROJECT_CXXFLAGS $libpistache_CFLAGS\"\n    YOURPROJECT_LIBS=\"$YOURPROJECT_LIBS $libpistache_LIBS\"\n    \n```\n\n## CMake\nTo use with a CMake build environment, use the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module. Here is an example:\n\n```cmake\n    cmake_minimum_required(3.4 FATAL_ERROR)\n    project(\"MyPistacheProject\")\n\n    # Find the library.\n    find_package(Pistache 0.0.2 REQUIRED)\n\n    add_executable(${PROJECT_NAME} main.cpp)\n    target_link_libraries(${PROJECT_NAME} pistache_shared)\n```\n\n## Makefile\nTo use within a vanilla makefile, you can call `pkg-config` directly to supply compiler and linker flags using shell substitution.\n\n```\n    CFLAGS=-g3 -Wall -Wextra -Werror ...\n    LDFLAGS=-lfoo ...\n    ...\n    CFLAGS+= $(pkg-config --cflags libpistache)\n    LDFLAGS+= $(pkg-config --libs libpistache)\n```\n\n# Building from source\n\nTo download the latest available release, clone the repository over github.\n\n```console\n    $ git clone https://github.com/oktal/pistache.git\n```\n\nThen, init the submodules:\n\n```console\n    $ git submodule update --init\n```\n\nNow, compile the sources:\n\n```console\n    $ cd pistache\n    $ mkdir -p {build,prefix}\n    $ cd build\n    $ cmake -G \"Unix Makefiles\" \\\n        -DCMAKE_BUILD_TYPE=Release \\\n        -DPISTACHE_BUILD_EXAMPLES=true \\\n        -DPISTACHE_BUILD_TESTS=true \\\n        -DPISTACHE_BUILD_DOCS=false \\\n        -DPISTACHE_USE_SSL=true \\\n        -DCMAKE_INSTALL_PREFIX=$PWD/../prefix \\\n        ../\n    $ make -j\n    $ make install\n```\n\nIf you chose to build the examples, then perform the following to build the examples.\n```console\n    $ cd examples\n    $ make -j\n```\n\nOptionally, you can also build and run the tests (tests require the examples):\n\n```console\n    $ cmake -G \"Unix Makefiles\" -DPISTACHE_BUILD_EXAMPLES=true -DPISTACHE_BUILD_TESTS=true ..\n    $ make test test_memcheck\n```\n\nBe patient, async_test can take some time before completing. And that's it, now you can start playing with your newly installed Pistache framework.\n\nSome other CMAKE defines:\n\n| Option                        | Default     | Description                                    |\n|-------------------------------|-------------|------------------------------------------------|\n| PISTACHE_BUILD_EXAMPLES       | False       | Build all of the example apps                  |\n| PISTACHE_BUILD_TESTS          | False       | Build all of the unit tests                    |\n| PISTACHE_ENABLE_NETWORK_TESTS | True        | Run unit tests requiring remote network access |\n| PISTACHE_USE_SSL              | False       | Build server with SSL support                  |\n\n# Continuous Integration Testing\n\nIt is important that all patches pass unit testing. Unfortunately developers make all kinds of changes to their local development environment that can have unintended consequences. This can means sometimes tests on the developer's computer pass when they should not, and other times failing when they should not have. \n\nTo properly validate that things are working, continuous integration (CI) is required. This means compiling, performing local in-tree unit tests, installing through the system package manager, and finally testing the actually installed build artifacts to ensure they do what the user expects them to do.\n\nThe key thing to remember is that in order to do this properly, this all needs to be done within a realistic end user system that hasn't been unintentionally modified by a developer. This might mean a chroot container with the help of QEMU and KVM to verify that everything is working as expected. The hermetically sealed test environment validates that the developer's expected steps for compilation, linking, unit testing, and post installation testing are actually replicable.\n\nThere are [different ways](https://wiki.debian.org/qa.debian.org#Other_distributions) of performing CI on different distros. The most common one is via the international [DEP-8](https://dep-team.pages.debian.net/deps/dep8/) standard as used by hundreds of different operating systems.\n\n## Autopkgtest\nOn Debian based distributions, `autopkgtest` implements the DEP-8 standard. To create and use a build image environment for Ubuntu, follow these steps. First install the autopkgtest(1) tools:\n```\n$ sudo apt install autopkgtest\n```\n\nNext create the test image, substituting `groovy` or `amd64` for other releases or architectures:\n```\n$ autopkgtest-buildvm-ubuntu-cloud -r groovy -a amd64\n```\n\nGenerate a Pistache source package in the parent directory of `pistache_source`:\n```\n$ cd pistache_source\n$ sudo apt build-dep pistache\n$ ./debian/rules get-orig-source\n$ debuild -S -sa -uc\n```\n\nTest the source package on the host architecture in QEMU with KVM support and 8GB of RAM and four CPUs:\n```\n$ autopkgtest --shell-fail --apt-upgrade ../pistache_(...).dsc -- \\\n      qemu --ram-size=8192 --cpus=4 --show-boot path_to_build_image.img \\\n      --qemu-options='-enable-kvm'\n```\n\n# Example\n\n## Hello World (server)\n\n```cpp\n#include \u003cpistache/endpoint.h\u003e\n\nusing namespace Pistache;\n\nstruct HelloHandler : public Http::Handler {\n  HTTP_PROTOTYPE(HelloHandler)\n  void onRequest(const Http::Request\u0026, Http::ResponseWriter writer) override{\n    writer.send(Http::Code::Ok, \"Hello, World!\");\n  }\n};\n\nint main() {\n  Http::listenAndServe\u003cHelloHandler\u003e(Pistache::Address(\"*:9080\"));\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiponcs%2Fpistache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiponcs%2Fpistache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiponcs%2Fpistache/lists"}