C API for hrengin