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