<div dir="ltr">How does the module system actually work in Swift? From what I&#39;ve seen so far it seems to be pretty tied in with XCode and tools like the package manager.<div><br></div><div>I come from languages like Rust where modules either map to files or to folders with a `<a href="http://mod.rs">mod.rs</a>` file inside. I can also define modules inside of source files with the `mod` keyword.</div><div><br></div><div>From what I&#39;ve seen the way modules work in Swift is not very flexible.</div></div>