Skip to content

Install

Paul Wankadia edited this page May 17, 2023 · 33 revisions

Quick links: browse | changes

RE2 should build and run on any modern Unix clone with GCC or Clang.

git clone https://code.googlesource.com/re2
cd re2
make
make test
make install
make testinstall

(On BSD systems, use gmake instead of make.)

Building RE2 requires Abseil (https://github.com/abseil/abseil-cpp) to be installed on your system. Building the testing for RE2 requires GoogleTest (https://github.com/google/googletest) and Benchmark (https://github.com/google/benchmark) to be installed as well.

Bazel and CMake are also supported. The latter enables generation of Visual Studio and Xcode projects as well as Cygwin, MinGW and MSYS makefiles. Bug reports and/or fixes are welcome!

Your compiler must support C++14.
Visual Studio users: You need Visual Studio 2019 or later.
Cygwin users: You must run CMake from the Cygwin command line, not the Windows command line.

For documentation on how to use RE2, see the comment at the top of re2/re2.h.

How to contribute code.

Mail re2-dev with problems.

RE2's native language is C++.

The Python wrapper is at https://github.com/google/re2/tree/abseil/python
and on PyPI (https://pypi.org/project/google-re2/).

A C wrapper is at https://github.com/marcomaggi/cre2/.
A D wrapper is at https://github.com/ShigekiKarita/re2d/ and on DUB (code.dlang.org).
An Erlang wrapper is at https://github.com/dukesoferl/re2/ and on Hex (hex.pm).
An Inferno wrapper is at https://github.com/powerman/inferno-re2/.
A Node.js wrapper is at https://github.com/uhop/node-re2/ and on NPM (npmjs.com).
An OCaml wrapper is at https://github.com/janestreet/re2/ and on OPAM (opam.ocaml.org).
A Perl wrapper is at https://github.com/dgl/re-engine-RE2/ and on CPAN (cpan.org).
An R wrapper is at https://github.com/girishji/re2/ and on CRAN (cran.r-project.org).
A Ruby wrapper is at https://github.com/mudge/re2/ and on RubyGems (rubygems.org).
A WebAssembly wrapper is at https://github.com/google/re2-wasm/ and on NPM (npmjs.com).

Clone this wiki locally