Merge: Use light FFI instead of the legacy NI in the lib