experimenting FFI

copied es_util library from Angle repository