Skip to content

Precompiled versions

Eugene Lazutkin edited this page May 25, 2023 · 8 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.

It should be noted that precompiled artifacts are offered as a convenient shortcut and are not guaranteed in any way to be available for any given configuration. You should always be ready to compile the extension locally. The project uses node-gyp, which requires an installation of platform-specific dependencies. Make sure that all dependencies are installed properly.

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 (5/25/2023), it means versions 16, 18, and 20: https://endoflife.date/nodejs

re2-specific details:

  • All builds are listed in build.yml.
    • All details of building environments can be found in actions.
      • Different distros may be 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