use an inline unsafePerformIO
explicit exports, fix argument order of appMatrixRaw