Rustpkg: tests, and doing inference properly

r? @graydon