rustpkg: Implement RUST_PATH

r? @brson Unfortunately, the main test for this is ignored due to #7071.

Closes #5682