port to rustpkg