import_path
This post is not a Q, but rather an A for peeps to search out. I'm abusing this Questions forum as a knowledge base, so to say.
In this vid, Shashank refs that the file
That path contains a bunch of
So, dir
I can do that without copying the
Of note:
there is both a
:mojo: :mojonightly:
In this vid, Shashank refs that the file
~/.modular/modular.cfg's setting mojo.import_path can take comma-sep values to identify multiple import paths. The default value is something like:That path contains a bunch of
.mojopkg files (like stdlib.mojopkg, algo, math, etc). As the video says, you can add another path, like this:So, dir
/path/to/packages/ is where I direct the "package" command's output. E.g., mojo package SomePkg -o /path/to/packages/SomePkg.mojopkg. As a result, I can do:I can do that without copying the
.mojopkg file into every project that uses it.Of note:
there is both a
[mojo] and a [mojo-nightly] section in the file ~/.modular/modular.cfg. If you want both stable and nightly to import from the same dir, then you need to add ,/path/to/packages to both sections' respective import_path setting.:mojo: :mojonightly:
YouTubeModular
Mojo
on Mac (Apple Silicon) is going to be here soon! Join us on our upcoming community livestream as we discuss all things Mojo
on Mac! We'll walk you through getting started with Mojo
Mac, discuss Mac specific features, and show you how to build and run Mojo
applications using Visual Studio on Mac! We have lots of cool demos and a communit...

