rust seems to break all the time unless you use an extremely recent version of macOS. I recommend avoiding it on unsupported macOS versions, or in general, if possible.
= note: Undefined symbols for architecture i386:
"___mpls_closedir", referenced from:
llvm::sys::fs::detail::directory_iterator_increment(llvm::sys::fs::detail::DirIterState&) in librustc_llvm-e0dfc3518f302824.rlib(Path.cpp.o)
std::__1::__shared_ptr_emplace<llvm::sys::fs::detail::DirIterState, std::__1::allocator<llvm::sys::fs::detail::DirIterState> >::~__shared_ptr_emplace() in librustc_llvm-e0dfc3518f302824.rlib(Path.cpp.o)
std::__1::__shared_ptr_emplace<llvm::sys::fs::detail::DirIterState, std::__1::allocator<llvm::sys::fs::detail::DirIterState> >::~__shared_ptr_emplace() in librustc_llvm-e0dfc3518f302824.rlib(Path.cpp.o)
std::__1::__shared_ptr_emplace<llvm::sys::fs::detail::DirIterState, std::__1::allocator<llvm::sys::fs::detail::DirIterState> >::__on_zero_shared() in librustc_llvm-e0dfc3518f302824.rlib(Path.cpp.o)
"___mpls_readdir", referenced from:
llvm::sys::fs::detail::directory_iterator_increment(llvm::sys::fs::detail::DirIterState&) in librustc_llvm-e0dfc3518f302824.rlib(Path.cpp.o)
"___mpls_opendir", referenced from:
llvm::sys::fs::detail::directory_iterator_construct(llvm::sys::fs::detail::DirIterState&, llvm::StringRef, bool) in librustc_llvm-e0dfc3518f302824.rlib(Path.cpp.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Did not run successfully: exit status: 1