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
Go to file
Viktor Szakats 60c3d04465
autotools: add support for 'unity' builds, enable in CI
Implement the "unity" builds as known from CMake, but for autotools.
It's limited to `lib` and `src` (CMake also supports it in `tests`).

Enable with: `--enable-unity` (disabled by default)

Unity builds speed up builds significantly. Cygwin and Windows builds in
particular, but the effect is noticeable on most systems. It also allows
discovering unity issues with autotools, benefitting also CMake when
building the same combination. In CI it makes turnaround times quicker.

This closes build performance with CMake. autotools still lags behind
because it builds shared and static libcurl in two, separate passes.
CMake does it in one. Manpage compilation isn't batched, it is in CMake.
After unity and test bundle support the slowest parts of the build are
the configuration phase (which is effectively a tedious, non-parallel,
compilation and/or linking of 300+ tiny programs. The next bottleneck
is compiling individual examples and finally test servers (only slow
with autotools).

The autotools implementation is slightly less efficient than CMake,
because 3 sources are permanently excluded while in CMake this isn't
necessary and solved more efficiently while building libtests. There is
also no 'unity' support for tests, making them a less efficient also.

Enable it in CI for most `configure` jobs. Except in GHA/dist (though
it works fine there too), to use the default config there. Also skip for
the Linux AWC-LC job where it made builds time a few seconds longer
(reason undiscovered.)

Autotools test suite builds compared between master -> `--enable-unity`:
- GHA/Linux: 32s -> 12s
  https://github.com/curl/curl/actions/runs/10705668823/job/29681617374
  https://github.com/curl/curl/actions/runs/10742978889/job/29796766297
- GHA/macOS: 37s -> 10s
  https://github.com/curl/curl/actions/runs/10705668813/job/29681632885
  https://github.com/curl/curl/actions/runs/10742978699/job/29796768875
- GHA/FreeBSD: 15m25 -> 10m58 (full workflow time, ~qemu)
  https://github.com/curl/curl/actions/runs/10705668811/job/29681607915
  https://github.com/curl/curl/actions/runs/10742978937/job/29796766115
- GHA/Cygwin: 3m32 -> 1m21
  https://github.com/curl/curl/actions/runs/10705668809/job/29681609965
  https://github.com/curl/curl/actions/runs/10742978645/job/29796756933
- GHA/MSYS2: 2m42 -> 50s
  https://github.com/curl/curl/actions/runs/10705668808/job/29681621166
  https://github.com/curl/curl/actions/runs/10742978662/job/29799739289
- GHA/mingw-w64: 5m32 -> 1m23
  https://github.com/curl/curl/actions/runs/10705668808/job/29681628787
  https://github.com/curl/curl/actions/runs/10742978662/job/29799741568

Closes #14815
2024-09-20 23:53:33 +02:00
.circleci autotools: add support for 'unity' builds, enable in CI 2024-09-20 23:53:33 +02:00
.github autotools: add support for 'unity' builds, enable in CI 2024-09-20 23:53:33 +02:00
CMake cmake/FindNGTCP2: use library path as hint for finding the crypto module 2024-09-19 15:56:30 +02:00
docs cmake: separate target for examples, optimize CI, fix fallouts 2024-09-20 23:53:33 +02:00
include RELEASE-NOTES: synced 2024-09-18 15:21:04 +02:00
lib autotools: add support for 'unity' builds, enable in CI 2024-09-20 23:53:33 +02:00
LICENSES copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
m4 build: buildinfo.txt improvements 2024-09-19 15:56:30 +02:00
packages lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
plan9 copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
projects misc: general C style cleanups 2024-08-22 23:43:45 +02:00
scripts autotools: add support for 'unity' builds, enable in CI 2024-09-20 23:53:33 +02:00
src autotools: add support for 'unity' builds, enable in CI 2024-09-20 23:53:33 +02:00
tests runtests: log output improvements 2024-09-20 23:53:32 +02:00
winbuild tidy-up: OS names 2024-08-04 19:17:45 +02:00
.dir-locals.el copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
.git-blame-ignore-revs copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
.gitattributes winbuild: MS-DOS batch tidy-ups 2024-07-02 19:26:15 +02:00
.gitignore build: buildinfo.txt improvements 2024-09-19 15:56:30 +02:00
.mailmap mailmap: Aki Sakurai 2024-08-30 10:28:34 +02:00
acinclude.m4 build: buildinfo.txt improvements 2024-09-19 15:56:30 +02:00
appveyor.sh cmake: separate target for examples, optimize CI, fix fallouts 2024-09-20 23:53:33 +02:00
appveyor.yml cmake: separate target for examples, optimize CI, fix fallouts 2024-09-20 23:53:33 +02:00
buildconf copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
buildconf.bat buildconf.bat: remove outdated groff/nroff use 2024-03-07 22:38:16 +01:00
CHANGES.md CHANGES: rename to CHANGES.md, no longer generated 2024-08-01 13:37:12 +02:00
CMakeLists.txt cmake: separate target for examples, optimize CI, fix fallouts 2024-09-20 23:53:33 +02:00
configure.ac autotools: add support for 'unity' builds, enable in CI 2024-09-20 23:53:33 +02:00
COPYING COPYING: update copyright year 2024-01-08 18:40:06 +01:00
curl-config.in build: tidy up internal macro names for libcurl.pc 2024-08-12 14:56:41 +02:00
Dockerfile maketgz: move from / into scripts 2024-09-05 17:07:41 +02:00
GIT-INFO.md GIT-INFO.md: remove version requirements 2024-07-08 23:06:05 +02:00
libcurl.pc.in build: tidy up internal macro names for libcurl.pc 2024-08-12 14:56:41 +02:00
Makefile.am build: buildinfo.txt improvements 2024-09-19 15:56:30 +02:00
Makefile.dist Makefile.dist: fix ca-firefox target 2024-09-06 21:46:05 +02:00
README docs: minor grammar fixes 2022-09-29 10:44:12 +02:00
README.md README: refresh 2024-08-25 23:31:53 +02:00
RELEASE-NOTES RELEASE-NOTES: synced 2024-09-18 15:21:04 +02:00
renovate.json GHA: unify http3 workflows into one 2024-06-01 10:57:23 +02:00
REUSE.toml lib: enable strerror and strncpy checksrc warnings in subdirs 2024-09-09 16:51:21 +02:00
SECURITY.md docs: Clarify OpenSSF Best Practices vs Scorecard 2024-08-22 11:50:20 +02:00

curl logo

Curl is a command-line tool for transferring data specified with URL syntax. Learn how to use curl by reading the manpage or everything curl.

Find out how to install curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl manpage to learn how.

Open Source

curl is Open Source and is distributed under an MIT-like license.

Contact

Contact us on a suitable mailing list or use GitHub issues/ pull requests/ discussions.

All contributors to the project are listed in the THANKS document.

Commercial support

For commercial support, maybe private and dedicated help with your problems or applications using (lib)curl visit the support page.

Website

Visit the curl website for the latest news and downloads.

Source code

Download the latest source from the Git server:

git clone https://github.com/curl/curl.git

Security problems

Report suspected security problems via our HackerOne page and not in public.

Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.

Backers

Thank you to all our backers! 🙏 Become a backer.

Sponsors

Support this project by becoming a sponsor.