Skip to content

Precompiled versions

Eugene Lazutkin edited this page Dec 26, 2021 · 9 revisions

This project is a binary (C++) addon for Node written with NAN and as such it requires platform-specific build tools and node-gyp installed and properly configured. In most cases, the hassle of compilation can be avoided by identifying the platform and downloading a pre-compiled artifact. It is done with install-artifact-from-github. If you have any problems with this tool or want to bypass it, please consult the documentation hosted in its wiki.

Opting out from using pre-compiled versions

If you want to opt-out from fetching a precompiled version and build locally, define the following environment variable: DEVELOPMENT_SKIP_GETTING_ASSET with any non-empty string value. Example: DEVELOPMENT_SKIP_GETTING_ASSET=yes.

Supported pre-compiled versions

The policy is to provide builds with the latest re2 release for the Node versions with an active "Security Support". At the moment of this writing (12/26/2021), it means versions 12, 14, 16, and 17: https://endoflife.date/nodejs

re2-specific details:

  • All builds are listed in build.yml.
    • As of 12/26/2021 we build binaries for the following platform/node combinations:
      • Windows: 10, 12, 14, 16, 17.
      • MacOS (intel): 10, 12, 14, 16, 17.
      • Linux CentOS 6: 10.
      • Linux CentOS 7: 12, 14, 16, 17.
      • Alpine Linux (MUSL): 10, 12, 14, 16, 17.
    • All details of building environments can be found in actions.
      • Different distros are used to minimize versions of required internal libraries increasing interoperability.
  • The results are saved in a corresponding release (see releases).

Private mirrors

You can create one by copying existing artifacts from a release or building all necessary versions yourself. All necessary details are described in making local mirrors of install-artifact-from-github.

The following re2-specific environment variables are used:

Command-line arg Value
--host-var RE2_DOWNLOAD_MIRROR
--skip-path-var RE2_DOWNLOAD_SKIP_PATH
--skip-ver-var RE2_DOWNLOAD_SKIP_VER

Example:

RE2_DOWNLOAD_MIRROR=https://local.mirror/vendors/re2 RE2_DOWNLOAD_SKIP_PATH=1 npm i