xref: /aosp_15_r20/external/webrtc/third_party/abseil-cpp/README.md (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker# Abseil - C++ Common Libraries
2*d9f75844SAndroid Build Coastguard Worker
3*d9f75844SAndroid Build Coastguard WorkerThe repository contains the Abseil C++ library code. Abseil is an open-source
4*d9f75844SAndroid Build Coastguard Workercollection of C++ code (compliant to C++14) designed to augment the C++
5*d9f75844SAndroid Build Coastguard Workerstandard library.
6*d9f75844SAndroid Build Coastguard Worker
7*d9f75844SAndroid Build Coastguard Worker## Table of Contents
8*d9f75844SAndroid Build Coastguard Worker
9*d9f75844SAndroid Build Coastguard Worker- [About Abseil](#about)
10*d9f75844SAndroid Build Coastguard Worker- [Quickstart](#quickstart)
11*d9f75844SAndroid Build Coastguard Worker- [Building Abseil](#build)
12*d9f75844SAndroid Build Coastguard Worker- [Support](#support)
13*d9f75844SAndroid Build Coastguard Worker- [Codemap](#codemap)
14*d9f75844SAndroid Build Coastguard Worker- [Releases](#releases)
15*d9f75844SAndroid Build Coastguard Worker- [License](#license)
16*d9f75844SAndroid Build Coastguard Worker- [Links](#links)
17*d9f75844SAndroid Build Coastguard Worker
18*d9f75844SAndroid Build Coastguard Worker<a name="about"></a>
19*d9f75844SAndroid Build Coastguard Worker## About Abseil
20*d9f75844SAndroid Build Coastguard Worker
21*d9f75844SAndroid Build Coastguard WorkerAbseil is an open-source collection of C++ library code designed to augment
22*d9f75844SAndroid Build Coastguard Workerthe C++ standard library. The Abseil library code is collected from Google's
23*d9f75844SAndroid Build Coastguard Workerown C++ code base, has been extensively tested and used in production, and
24*d9f75844SAndroid Build Coastguard Workeris the same code we depend on in our daily coding lives.
25*d9f75844SAndroid Build Coastguard Worker
26*d9f75844SAndroid Build Coastguard WorkerIn some cases, Abseil provides pieces missing from the C++ standard; in
27*d9f75844SAndroid Build Coastguard Workerothers, Abseil provides alternatives to the standard for special needs
28*d9f75844SAndroid Build Coastguard Workerwe've found through usage in the Google code base. We denote those cases
29*d9f75844SAndroid Build Coastguard Workerclearly within the library code we provide you.
30*d9f75844SAndroid Build Coastguard Worker
31*d9f75844SAndroid Build Coastguard WorkerAbseil is not meant to be a competitor to the standard library; we've
32*d9f75844SAndroid Build Coastguard Workerjust found that many of these utilities serve a purpose within our code
33*d9f75844SAndroid Build Coastguard Workerbase, and we now want to provide those resources to the C++ community as
34*d9f75844SAndroid Build Coastguard Workera whole.
35*d9f75844SAndroid Build Coastguard Worker
36*d9f75844SAndroid Build Coastguard Worker<a name="quickstart"></a>
37*d9f75844SAndroid Build Coastguard Worker## Quickstart
38*d9f75844SAndroid Build Coastguard Worker
39*d9f75844SAndroid Build Coastguard WorkerIf you want to just get started, make sure you at least run through the
40*d9f75844SAndroid Build Coastguard Worker[Abseil Quickstart](https://abseil.io/docs/cpp/quickstart). The Quickstart
41*d9f75844SAndroid Build Coastguard Workercontains information about setting up your development environment, downloading
42*d9f75844SAndroid Build Coastguard Workerthe Abseil code, running tests, and getting a simple binary working.
43*d9f75844SAndroid Build Coastguard Worker
44*d9f75844SAndroid Build Coastguard Worker<a name="build"></a>
45*d9f75844SAndroid Build Coastguard Worker## Building Abseil
46*d9f75844SAndroid Build Coastguard Worker
47*d9f75844SAndroid Build Coastguard Worker[Bazel](https://bazel.build) and [CMake](https://cmake.org/) are the official
48*d9f75844SAndroid Build Coastguard Workerbuild systems for Abseil.
49*d9f75844SAndroid Build Coastguard WorkerSee the [quickstart](https://abseil.io/docs/cpp/quickstart) for more information
50*d9f75844SAndroid Build Coastguard Workeron building Abseil using the Bazel build system.
51*d9f75844SAndroid Build Coastguard WorkerIf you require CMake support, please check the [CMake build
52*d9f75844SAndroid Build Coastguard Workerinstructions](CMake/README.md) and [CMake
53*d9f75844SAndroid Build Coastguard WorkerQuickstart](https://abseil.io/docs/cpp/quickstart-cmake).
54*d9f75844SAndroid Build Coastguard Worker
55*d9f75844SAndroid Build Coastguard Worker<a name="support"></a>
56*d9f75844SAndroid Build Coastguard Worker## Support
57*d9f75844SAndroid Build Coastguard Worker
58*d9f75844SAndroid Build Coastguard WorkerAbseil follows Google's [Foundational C++ Support
59*d9f75844SAndroid Build Coastguard WorkerPolicy](https://opensource.google/documentation/policies/cplusplus-support). See
60*d9f75844SAndroid Build Coastguard Worker[this
61*d9f75844SAndroid Build Coastguard Workertable](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)
62*d9f75844SAndroid Build Coastguard Workerfor a list of currently supported versions compilers, platforms, and build
63*d9f75844SAndroid Build Coastguard Workertools.
64*d9f75844SAndroid Build Coastguard Worker
65*d9f75844SAndroid Build Coastguard Worker<a name="codemap"></a>
66*d9f75844SAndroid Build Coastguard Worker## Codemap
67*d9f75844SAndroid Build Coastguard Worker
68*d9f75844SAndroid Build Coastguard WorkerAbseil contains the following C++ library components:
69*d9f75844SAndroid Build Coastguard Worker
70*d9f75844SAndroid Build Coastguard Worker* [`base`](absl/base/)
71*d9f75844SAndroid Build Coastguard Worker  <br /> The `base` library contains initialization code and other code which
72*d9f75844SAndroid Build Coastguard Worker  all other Abseil code depends on. Code within `base` may not depend on any
73*d9f75844SAndroid Build Coastguard Worker  other code (other than the C++ standard library).
74*d9f75844SAndroid Build Coastguard Worker* [`algorithm`](absl/algorithm/)
75*d9f75844SAndroid Build Coastguard Worker  <br /> The `algorithm` library contains additions to the C++ `<algorithm>`
76*d9f75844SAndroid Build Coastguard Worker  library and container-based versions of such algorithms.
77*d9f75844SAndroid Build Coastguard Worker* [`cleanup`](absl/cleanup/)
78*d9f75844SAndroid Build Coastguard Worker  <br /> The `cleanup` library contains the control-flow-construct-like type
79*d9f75844SAndroid Build Coastguard Worker  `absl::Cleanup` which is used for executing a callback on scope exit.
80*d9f75844SAndroid Build Coastguard Worker* [`container`](absl/container/)
81*d9f75844SAndroid Build Coastguard Worker  <br /> The `container` library contains additional STL-style containers,
82*d9f75844SAndroid Build Coastguard Worker  including Abseil's unordered "Swiss table" containers.
83*d9f75844SAndroid Build Coastguard Worker* [`debugging`](absl/debugging/)
84*d9f75844SAndroid Build Coastguard Worker  <br /> The `debugging` library contains code useful for enabling leak
85*d9f75844SAndroid Build Coastguard Worker  checks, and stacktrace and symbolization utilities.
86*d9f75844SAndroid Build Coastguard Worker* [`flags`](absl/flags/)
87*d9f75844SAndroid Build Coastguard Worker  <br /> The `flags` library contains code for handling command line flags for
88*d9f75844SAndroid Build Coastguard Worker  libraries and binaries built with Abseil.
89*d9f75844SAndroid Build Coastguard Worker* [`hash`](absl/hash/)
90*d9f75844SAndroid Build Coastguard Worker  <br /> The `hash` library contains the hashing framework and default hash
91*d9f75844SAndroid Build Coastguard Worker  functor implementations for hashable types in Abseil.
92*d9f75844SAndroid Build Coastguard Worker* [`iterator`](absl/iterator/)
93*d9f75844SAndroid Build Coastguard Worker  <br /> The `iterator` library contains utilities for augmenting ranges in
94*d9f75844SAndroid Build Coastguard Worker  range-based for loops.
95*d9f75844SAndroid Build Coastguard Worker* [`log`](absl/log/)
96*d9f75844SAndroid Build Coastguard Worker  <br /> The `log` library contains `LOG` and `CHECK` macros and facilities
97*d9f75844SAndroid Build Coastguard Worker  for writing logged messages out to disk, `stderr`, or user-extensible
98*d9f75844SAndroid Build Coastguard Worker  destinations.
99*d9f75844SAndroid Build Coastguard Worker* [`memory`](absl/memory/)
100*d9f75844SAndroid Build Coastguard Worker  <br /> The `memory` library contains memory management facilities that augment
101*d9f75844SAndroid Build Coastguard Worker  C++'s `<memory>` library.
102*d9f75844SAndroid Build Coastguard Worker* [`meta`](absl/meta/)
103*d9f75844SAndroid Build Coastguard Worker  <br /> The `meta` library contains compatible versions of type checks
104*d9f75844SAndroid Build Coastguard Worker  available within C++14 and C++17 versions of the C++ `<type_traits>` library.
105*d9f75844SAndroid Build Coastguard Worker* [`numeric`](absl/numeric/)
106*d9f75844SAndroid Build Coastguard Worker  <br /> The `numeric` library contains 128-bit integer types as well as
107*d9f75844SAndroid Build Coastguard Worker  implementations of C++20's bitwise math functions.
108*d9f75844SAndroid Build Coastguard Worker* [`profiling`](absl/profiling/)
109*d9f75844SAndroid Build Coastguard Worker  <br /> The `profiling` library contains utility code for profiling C++
110*d9f75844SAndroid Build Coastguard Worker  entities.  It is currently a private dependency of other Abseil libraries.
111*d9f75844SAndroid Build Coastguard Worker* [`random`](absl/random/)
112*d9f75844SAndroid Build Coastguard Worker  <br /> The `random` library contains functions for generating psuedorandom
113*d9f75844SAndroid Build Coastguard Worker  values.
114*d9f75844SAndroid Build Coastguard Worker* [`status`](absl/status/)
115*d9f75844SAndroid Build Coastguard Worker  <br /> The `status` library contains abstractions for error handling,
116*d9f75844SAndroid Build Coastguard Worker  specifically `absl::Status` and `absl::StatusOr<T>`.
117*d9f75844SAndroid Build Coastguard Worker* [`strings`](absl/strings/)
118*d9f75844SAndroid Build Coastguard Worker  <br /> The `strings` library contains a variety of strings routines and
119*d9f75844SAndroid Build Coastguard Worker  utilities, including a C++14-compatible version of the C++17
120*d9f75844SAndroid Build Coastguard Worker  `std::string_view` type.
121*d9f75844SAndroid Build Coastguard Worker* [`synchronization`](absl/synchronization/)
122*d9f75844SAndroid Build Coastguard Worker  <br /> The `synchronization` library contains concurrency primitives (Abseil's
123*d9f75844SAndroid Build Coastguard Worker  `absl::Mutex` class, an alternative to `std::mutex`) and a variety of
124*d9f75844SAndroid Build Coastguard Worker  synchronization abstractions.
125*d9f75844SAndroid Build Coastguard Worker* [`time`](absl/time/)
126*d9f75844SAndroid Build Coastguard Worker  <br /> The `time` library contains abstractions for computing with absolute
127*d9f75844SAndroid Build Coastguard Worker  points in time, durations of time, and formatting and parsing time within
128*d9f75844SAndroid Build Coastguard Worker  time zones.
129*d9f75844SAndroid Build Coastguard Worker* [`types`](absl/types/)
130*d9f75844SAndroid Build Coastguard Worker  <br /> The `types` library contains non-container utility types, like a
131*d9f75844SAndroid Build Coastguard Worker  C++14-compatible version of the C++17 `std::optional` type.
132*d9f75844SAndroid Build Coastguard Worker* [`utility`](absl/utility/)
133*d9f75844SAndroid Build Coastguard Worker  <br /> The `utility` library contains utility and helper code.
134*d9f75844SAndroid Build Coastguard Worker
135*d9f75844SAndroid Build Coastguard Worker<a name="releases"></a>
136*d9f75844SAndroid Build Coastguard Worker## Releases
137*d9f75844SAndroid Build Coastguard Worker
138*d9f75844SAndroid Build Coastguard WorkerAbseil recommends users "live-at-head" (update to the latest commit from the
139*d9f75844SAndroid Build Coastguard Workermaster branch as often as possible). However, we realize this philosophy doesn't
140*d9f75844SAndroid Build Coastguard Workerwork for every project, so we also provide [Long Term Support
141*d9f75844SAndroid Build Coastguard WorkerReleases](https://github.com/abseil/abseil-cpp/releases) to which we backport
142*d9f75844SAndroid Build Coastguard Workerfixes for severe bugs. See our [release
143*d9f75844SAndroid Build Coastguard Workermanagement](https://abseil.io/about/releases) document for more details.
144*d9f75844SAndroid Build Coastguard Worker
145*d9f75844SAndroid Build Coastguard Worker<a name="license"></a>
146*d9f75844SAndroid Build Coastguard Worker## License
147*d9f75844SAndroid Build Coastguard Worker
148*d9f75844SAndroid Build Coastguard WorkerThe Abseil C++ library is licensed under the terms of the Apache
149*d9f75844SAndroid Build Coastguard Workerlicense. See [LICENSE](LICENSE) for more information.
150*d9f75844SAndroid Build Coastguard Worker
151*d9f75844SAndroid Build Coastguard Worker<a name="links"></a>
152*d9f75844SAndroid Build Coastguard Worker## Links
153*d9f75844SAndroid Build Coastguard Worker
154*d9f75844SAndroid Build Coastguard WorkerFor more information about Abseil:
155*d9f75844SAndroid Build Coastguard Worker
156*d9f75844SAndroid Build Coastguard Worker* Consult our [Abseil Introduction](https://abseil.io/about/intro)
157*d9f75844SAndroid Build Coastguard Worker* Read [Why Adopt Abseil](https://abseil.io/about/philosophy) to understand our
158*d9f75844SAndroid Build Coastguard Worker  design philosophy.
159*d9f75844SAndroid Build Coastguard Worker* Peruse our
160*d9f75844SAndroid Build Coastguard Worker  [Abseil Compatibility Guarantees](https://abseil.io/about/compatibility) to
161*d9f75844SAndroid Build Coastguard Worker  understand both what we promise to you, and what we expect of you in return.
162