{"id":13720916,"url":"https://github.com/apache/serf","last_synced_at":"2025-07-12T04:34:01.864Z","repository":{"id":65979611,"uuid":"70882928","full_name":"apache/serf","owner":"apache","description":"Mirror of Apache Serf","archived":false,"fork":false,"pushed_at":"2025-07-07T10:00:20.000Z","size":4004,"stargazers_count":27,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"trunk","last_synced_at":"2025-07-07T10:48:08.427Z","etag":null,"topics":["c","library","serf"],"latest_commit_sha":null,"homepage":null,"language":"C","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/apache.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","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,"zenodo":null}},"created_at":"2016-10-14T07:00:06.000Z","updated_at":"2025-07-07T10:00:24.000Z","dependencies_parsed_at":"2024-09-30T01:20:55.949Z","dependency_job_id":"eff41e75-ff82-4002-8444-912a1d06cd0a","html_url":"https://github.com/apache/serf","commit_stats":{"total_commits":1911,"total_committers":18,"mean_commits":"106.16666666666667","dds":0.7221350078492936,"last_synced_commit":"73f26fab7baca09c5257ac1da725589a639a44de"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/apache/serf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fserf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fserf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fserf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fserf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/serf/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fserf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264589024,"owners_count":23633231,"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","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":["c","library","serf"],"created_at":"2024-08-03T01:01:09.837Z","updated_at":"2025-07-12T04:34:01.846Z","avatar_url":"https://github.com/apache.png","language":"C","readme":"Welcome to Apache Serf, a high-performance asynchronous HTTP client library.\n\nThe Apache Serf library is a C-based HTTP client library built upon the Apache\nPortable Runtime (APR) library. It multiplexes connections, running the\nread/write communication asynchronously. Memory copies and transformations are\nkept to a minimum to provide high performance operation.\n\n  * Site: https://serf.apache.org/\n  * Code: https://svn.apache.org/repos/asf/serf/\n  * Official Git Mirror: https://github.com/apache/serf/\n  * Issues: https://issues.apache.org/jira/browse/SERF\n  * Mail: dev@serf.apache.org\n  * People: Justin Erenkrantz, Greg Stein\n\n----\n\n1. INSTALL\n\n1.1 Build systems\n\nApache Serf can use either SCons or CMake. Both build systems should offer\nthe same features.\n\n1.1.1 SCons build system\n\nYou must use at least SCons version 2.3.5. If it is not installed\non your system, then you can install it onto your system. If you do not\nhave permissions, then you can download and install the \"local\"\nversion into your home directory. When installed privately, simply\ncreate a symlink for 'scons' in your PATH to /path/to/scons/scons.py.\n\nFetch the scons-local package:\n  http://prdownloads.sourceforge.net/scons/scons-local-2.3.5.tar.gz\n  \nAlternatively create a virtual Python environment and install SCons via\npip (replace the path ~/scons_venv with your preferred path):\n\n  $ python -m venv ~/scons_venv\n  $ ~/scons_venv/bin/pip install scons\n\nIn the build instructions below, make sure to include the full path to your\nvirtual environment:\n\n  $ ~/scons_venv/bin/scons [...see below...]\n\n\n1.1.2 Building Apache Serf using SCons\n\nTo build serf:\n\n$ scons PREFIX=/path/to/prefix \\\n        APR=/path/to/apr APU=/path/to/apr-util \\\n        OPENSSL=/path/to/openssl ZLIB=/path/to/zlib \\\n        BROTLI=/path/to/brotli GSSAPI=/path/to/kerberos\n\nThe switches are recorded into .saved_config, so they only need to be\nspecified the first time scons is run.\n\nPREFIX should specify where serf should be installed.  PREFIX defaults to\n/usr/local.\n\nThe default for the mandatory dependencies (APR, APU, OPENSSL, ZLIB) is /usr.\n\nThe build system looks for apr-1-config at $APR/bin/apr-1-config, or\nthe path should indicate apr-1-config itself. Similarly for the path\nto apu-1-config in $APU or $APU/bin/apu-1-config.\n\nOPENSSL should specify the root of the install (e.g., /opt/local). The\nincludes will be found $OPENSSL/include/openssl and libraries at $OPENSSL/lib.\n\nZLIB should specify the root of the install. The includes will be found\n$ZLIB/include and libraries at $ZLIB/lib.\n\nThe BROTLI and GSSAPI dependencies are optional.\n\nBROTLI should be the path to the installation of the Brotli compression\nlibrary; for example, BROTLI=/usr/local. The includes will be found\nin $BROTLI/include/brotli and the libraries in $BROTLI/lib.\n\nGSSAPI should be the path to the installation of a package that provides\nthe GSSAPI implementation such as Kerberos5 or Heimdal. SCons will look\nfor the configuration program $GSSAPI/bin/krb5-config.\n\nNOTE: Do not use the GSSAPI switch on Windows; it provides the SSPI API\n      which Serf uses by default on that platform.\n\n\nIf you wish to use VPATH-style builds (where objects are created in a\ndistinct directory from the source), you can use:\n\n$ scons -Y /path/to/serf/source\n\nIf you plan to install the library on a system that uses different\npaths for architecture dependent files, specify LIBDIR. LIBDIR defaults\nto /usr/local/lib otherwise. Example for a 64 bit GNU/Linux system:\n\n$ scons PREFIX=/usr/ LIBDIR=/usr/lib64\n\nAt any point, the current settings can be examined:\n\n$ scons --help\n\n\n1.1.3 Running the test suite\n\n$ scons check\n\n\n1.1.4 Installing Apache Serf\n\n$ scons install\n\nNote that the PREFIX variable should have been specified in a previous\ninvocation of scons (and saved into .saved_config), or it can be\nspecified on the install command line:\n\n$ scons PREFIX=/some/path install\n\nDistribution package maintainers regularly install to a buildroot, and\nwould normally use something like below in their build systems, with\nplaceholders for the specific paths:\n\n$ scons PREFIX=/usr/ LIBDIR=/usr/lib64\n$ scons install --install-sandbox=/path/to/buildroot\n\n\n1.1.5 Cleaning up the build\n\n$ scons -c\n\n\n1.2.1 CMake build system\n\n\nGet the sources, either a release tarball or by checking out the\nofficial repository. The CMake build system currently only exists in\ntrunk and it will be included in the 1.5 release.\n\nThe process for building on Unix and Windows is the same.\n\n    $ cmake -B out [build options]\n    $ cmake --build out\n\nor, with a multi-config generator:\n\n    $ cmake --build out --config Release\n\n\"out\" in the commands above is the build directory used by CMake.\n\nBuild options can be added, for example:\n\n    $ cmake -B out -DCMAKE_INSTALL_PREFIX=/usr/local/serf -DSKIP_TESTS=ON\n\nBuild options can be listed using:\n\n    $ cmake -LH\n\nBy default, CMake will look for dependencies in ${CMAKE_SEARCH_PREFIX}, which\nyou can override on the command line, e.g.::\n\n    $ cmake -DCMAKE_SEARCH_PREFIX=/opt\n\nThe search for each the five dependencies can be modified by setting their\n*_ROOT CMake variables:\n\n    $ cmake -DAPR_ROOR=/path/to/apr \\\n            -DAPRUtil_ROOT=/path/to/apr-util \\\n            -DOPENSSL_ROOT_DIR=/path/to/openssl \\\n            -DZLIB_ROOT=/path/to/zlib \\\n            -DBrotli_ROOT=/path/to/brotli \\\n            -DGSSAPI_ROOT=/path/to/kerberos5\n\n\n1.2.2 MacOS specifics\n\nThe CMake build system can search for dependencies from Homebrew or\nMacPorts: use 'cmake -DUSE_HOMEBREW=ON' to search for Homebrew packages,\nor 'cmake -DUSE_MACPORTS=ON' to search installed MacPorts. Just not both.\n\n\n1.2.3 Windows tricks\n\n- Modern versions of Microsoft Visual Studio provide support for\n  CMake projects out-of-box, including intellisense, integrated\n  options editor, test explorer, and more.\n\n  In order to use it for Serf, open the source directory with\n  Visual Studio, and the configuration should start automatically.\n  For editing the cache (options), do right-click to the CMakeLists.txt\n  file and clicking `CMake Settings for Serf` will open the\n  editor. After the required settings are configured, hit `F7` in\n  order to build. For more info, check the article bellow:\n\n      https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio\n\n- There is a useful tool for bootstrapping the dependencies,\n  vcpkg. It provides ports for the most of Serf's dependencies,\n  which then could be installed via a single command.\n\n  To start using it, download the registry from GitHub, bootstrap\n  vcpkg, and install the dependencies:\n\n      $ git clone https://github.com/microsoft/vcpkg\n      $ cd vcpkg \u0026\u0026 .\\bootstrap-vcpkg.bat -disableMetrics\n      $ .\\vcpkg install apr apr-util [any other dependency]\n\n  After this is done, vcpkg can be integrated into CMake by passing\n  the vcpkg toolchain to CMAKE_TOOLCHAIN_FILE option. In order to do\n  it with Visual Studio, open the CMake cache editor as explained in\n  the previous step, and put the following into `CMake toolchain\n  file` field, where VCPKG_ROOT is the path to vcpkg registry:\n\n      \u003cVCPKG_ROOT\u003e/scripts/buildsystems/vcpkg.cmake\n\n\n1.2.4 Running the test suite\n\nTo run the test suite, go to the CMake output directory, then:\n\n    $ ctest\n\nor, with a multi-config generator:\n\n    $ ctest -C Release\n\nThis is equivalent to:\n\n    $ cmake --build out --target test\n\nor:\n\n    $ cmake --build out --config Release --target test\n\nor, on Windows using the Visual Studio generator:\n\n    $ cmake --build out --config Release --target run_tests\n)\n\n\n1.2.5 Installing Apache Serf\n\n    $ cmake --build out --target install\n    $ cmake --build out --config Release --target install\n\n","funding_links":[],"categories":["Programming Languages"],"sub_categories":["C++"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fserf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fserf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fserf/lists"}