Questions about the package system

Do we have any content (blog posts, videos, etc) on how the package system works? I don’t mean how to use it or how to structure my project, but how does the system work internally?
I have a question, for instance, do I have any substantial overhead when I import the same package from multiple files inside one package? Like, let’s say I have 3 files in package “a” and all of them import package “b”, would it be better if I just had 1 file in package “a”?

To answer your questions:

  • A package is a directory containing *.odin files
  • There is virtually-zero-overhead importing the same package from multiple files inside one package. This is all done during parsing stage, and trivially cached with a basic hash map look up. Do not worry about this, as things only ever get imported once. Odin’s systems is nothing like C’s #include which is just textual inclusion.
  • The entire design of Odin’s import system is that you import locally to that file so that you can see what is being imported in the first place. The cost of this was designed to be as cheap (virtually free) as possible.