Professional Documents
Culture Documents
Code layout
The curl source code tree is neither large nor complicated. A key thing to remember is, perhaps,
that libcurl is the library and that library is the biggest component of the curl command-line tool.
root
We try to keep the number of files in the source tree root to a minimum. You will see a slight
difference in files if you check a release archive compared to what is stored in the git repository
as several files are generated by the release scripts.
build curl after having checked out the code from git.
maketgz : the script used to produce release archives and daily snapshots
RELEASE-NOTES : contains the changes done for the latest release; when
found in git it contains the changes done since the previous release that
are destined to end up in the coming release.
lib
https://ec.haxx.se/sourcecode/sourcecode-layout 1/6
22.8.2020 Code layout - Everything curl
This directory contains the full source code for libcurl. It is the same source code for all
platforms—over one hundred C source files and a few more private header files. The header files
used when building applications against libcurl are not stored in this directory; see include/curl
for those.
Depending on what features are enabled in your own build and what functions your platform
provides, some of the source files or portions of the source files may contain code that is not
used in your particular build.
lib/vtls
The VTLS sub section within libcurl is the home of all the TLS backends libcurl can be built to
support. The "virtual" TLS internal API is a common API that is used within libcurl to access TLS
and crypto functions without the main code knowing exactly which TLS library that is used. This
allows the person who builds libcurl to select from a wide variety TLS libraries to build with.
We also maintain a SSL comparison table on the web site to aid users.
src
https://ec.haxx.se/sourcecode/sourcecode-layout 2/6
22.8.2020 Code layout - Everything curl
This directory holds the source code for the curl command-line tool. It is the same source code
for all platforms that run the tool.
Most of what the command-line tool does is to convert given command line options into the
corresponding libcurl options or set of options and then makes sure to issue them correctly to
drive the network transfer according to the user's wishes.
include/curl
Here are the public header files that are provided for libcurl-using applications. Some of them are
generated at configure or release time so they do not look identical in the git repository as they
do in a release archive.
With modern libcurl, all an application is expected to include in its C source code is
#include <curl/curl.h>
docs
The main documentation location. Text files in this directory are typically plain text files. We have
slowly started to move towards Markdown format so a few (but growing number of) files use the
.md extension to signify that.
Most of these documents are also shown on the curl web site automatically converted from text
to a web friendly format/look.
BINDINGS : lists all known libcurl language bindings and where to find them
https://ec.haxx.se/sourcecode/sourcecode-layout 3/6
22.8.2020 Code layout - Everything curl
HISTORY : describes how the project started and has evolved over the years
INSTALL : how to build and install curl and libcurl from source
RESOURCES : further resources for further reading on what, why and how curl
does things
ROADMAP.md : what we want to work on in the future
THANKS : thanks to this extensive list of friendly people, curl exists today!
docs/libcurl
All libcurl functions have their own man pages in individual files with .3 extensions, using nroff
format, in this directory. There are also a few other files that are described below.
ABI
index.html
https://ec.haxx.se/sourcecode/sourcecode-layout 4/6
22.8.2020 Code layout - Everything curl
libcurl.3
libcurl-easy.3
libcurl-errors.3
libcurl.m4
libcurl-multi.3
libcurl-share.3
libcurl-thread.3
libcurl-tutorial.3
symbols-in-versions
docs/libcurl/opts
This directory contains the man pages for the individual options for three different libcurl
functions.
docs/examples
Contains around 100 stand-alone examples that are meant to help readers understand how
libcurl can be used.
scripts
Handy scripts.
given hash/tag. The purpose is to generate a list for the RELEASE-NOTES file
and to allow manually added names to remain in there even on updates. The
script uses the 'THANKS-filter` file to rewrite some names.
https://ec.haxx.se/sourcecode/sourcecode-layout 5/6
22.8.2020 Code layout - Everything curl
given hash/tag, filters out all the names that are already mentioned in
THANKS , and then outputs THANKS to stdout with the list of new
contributors appended at the end; it's meant to allow easier updates of the THANKS
document. The script uses the 'THANKS-filter` file to rewrite some names.
log2changes.pl : generates the CHANGES file for releases, as used by the
https://ec.haxx.se/sourcecode/sourcecode-layout 6/6