Installation

To build REMAT, you will first need to clone the remat repository and build the underlying C++ shared object library files from source. If you are cloning a new repository, you will need to obtain all required submodules (BLT) via:

git submodule update --init --recursive

To configure, build, and locally install REMAT:

mkdir build
cd build
cmake ..
make install

This will create a new local install subdirectory within the root REMAT project directory, containing all packaged Python modules and compiled C++ shared object libraries required to import and run the Python-based Examples.

If compiling the REMAT library to WebAssembly, be sure to configure CMake to use the Emscripten toolchain using emcmake to wrap the call to cmake:

emcmake cmake ..

Otherwise, the build/installation process described above remains the same.

To import the locally installed REMAT package within your Python project:

import sys
sys.path.append("PATH/TO/REMAT/install/package/")
import REMAT

The REMAT/examples subdirectory provides further illustrative cases of invocations of the library within the context of a Python workflow.

When packaging a pygame project that uses REMAT using pygbag for execution in a web browser, make sure that you have compiled the REMAT library using Emscripten (see above note on configuring CMake using emcmake), and include the install/package files directly within the local directory for your project. The provided examples offer a demonstration of how this can be accomplished, with the appropriate invocations of pygbag included in the examples/Makefile.

Dependencies

The core functionality of REMAT is primarily written in C++. A Python API wrapper module (implemented using ctypes) is provided to facilitate the use of REMAT in Python projects. Additional pre- and post-processing utilities are provided in Python, and demonstrated through several accompanying examples. While the underlying C++ framework does not have any dependencies apart from the standard library, the following Python packages are used by the API wrapper module and pre/post-processing utilities:

REMAT utilizes a CMake-based build framework in combination with the funtionality provided by BLT. CMake version 3.14+ is required to build/install REMAT from source, whereas BLT is included as a git submodule.

The accompanying Examples additionally make use of the following Python packages to enable interactive visualization:

Many of the Examples can be built for execution in a web browser using Emscripten to compile the underlying C++ library into WebAssembly, and pygbag to package the pygame-based visualizations.