rustpkg: Implement RUST_PATH

Unfortunately, the main test for this is ignored due to #7071.

Closes #5682