Refresh README
Updated to mention:
* C++ type support
* ELF / DWARF reader
* extraction to native format
* additional dependencies
* C++20 and compiler versions
* Docker build no longer involves libabigail and is always multistage
* a contact address
* distributions and source code
PiperOrigin-RevId: 579811075
Change-Id: I5619feb241fdfd5bd4197cb45d504ba83d8e6d80
diff --git a/README.md b/README.md
index 3dbbe1c..1d87ba1 100644
--- a/README.md
+++ b/README.md
@@ -2,28 +2,54 @@
The STG (symbol-type graph) is an ABI representation and this
project contains tools for the creation and comparison of such
-representations. At present parsers exist for libabigail's ABI XML
-(C types only) and BTF. The ABI diff tool, stgdiff, supports multiple
-reporting options.
+representations.
-This software currently depends on libxml2 for XML parsing, on libelf
-to find .BTF sections and on Linux UAPI headers for BTF types.
+The ABI extraction tool, `stg`, emits a native ABI format. Parsers exist for
+libabigail's XML format, BTF and ELF / DWARF.
-## How to build the project
+The ABI diff tool, `stgdiff`, supports multiple reporting options.
-To build from source, you will need a few dependencies:
+## Getting STG
-| *Debian* | *RedHat* |
-| -------------- | -------------- |
-| libelf-dev | elfutils-devel |
-| libxml2-dev | libxml2-devel |
-| linux-libc-dev | kernel-headers |
+### Distributions
+
+We intend to package STG for major distributions. Currently we have packages as
+follows:
+
+| *Distribution* | *Package* |
+| ---------------- | ----------------------------------------------------- |
+| Arch Linux (AUR) | [stg-git](https://aur.archlinux.org/packages/stg-git) |
+
+### Source Code
+
+This source code is available at
+https://android.googlesource.com/platform/external/stg/.
+
+## Building from Source
Instructions are included for local and Docker builds.
+### Dependencies
+
+STG is written in C++20. It is known to compile with GCC 11, Clang 14 or
+later versions.
+
+| *Dependency* | *Debian* | *RedHat* |
+| ------------- | ----------------- | ----------------- |
+| build | cmake | cmake |
+| ELF, BTF | libelf-dev | elfutils-devel |
+| DWARF | libdw-dev | elfutils-devel |
+| XML | libxml2-dev | libxml2-devel |
+| BTF | linux-libc-dev | kernel-headers |
+| native format | libprotobuf-dev | protobuf-devel |
+| native format | protobuf-compiler | protobuf-compiler |
+| allocator[^1] | libjemalloc-dev | jemalloc-devel |
+
+[^1]: jemalloc is optional but will likely improve performance.
+
### Local Build
-STG can be built with CMake as follows:
+Build STG using CMake as follows:
```bash
$ mkdir build && cd build
@@ -33,8 +59,8 @@
### Docker Build
-A [Dockerfile](Dockerfile) is provided to build a container with
-libabigail to easily compile the STG tools:
+A [Dockerfile](Dockerfile) is provided to build a container with the
+STG tools:
```bash
$ docker build -t stg .
@@ -46,7 +72,11 @@
$ docker run -it stg
```
-If you want to bind your development code to the container:
+Note that the Dockerfile provides only a production image. To use
+Docker as a development environment, you can comment out everything
+after the line `# second stage`.
+
+After that you may bind your development code to the container:
```bash
$ docker run -it $PWD:/src -it stg
@@ -55,12 +85,11 @@
The source code is added to `/src`, so when your code is bound you can
edit on your host and re-compile in the container.
-Note that the Dockerfile can provide a development environment (non
-multi-stage build with the source code) or a production image (a
-multi-stage build with only the final binary). By default we provide
-the first, and you can uncomment the final lines of the file for the
-latter.
-
## Contributions
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
+
+## Contact Information
+
+Please send feedback, questions and bug reports to
+[kernel-team@android.com](mailto:kernel-team@android.com).