How do Imports work in Odin? #2665
Answered
by
programandala-net
DreepyYunky
asked this question in
Q&A
Replies: 2 comments
-
Yunky86 escribió/skribis/wrote/scrit (2023-07-18T09:12:56-0700):
Can I create a prefix in odin (like `core:` or `vendor:`)
Yes, using the `-collection:` option of the `build` command. See the usage,
extracted from `odin help build`:
```
-collection:<name>=<filepath>
Defines a library collection used for imports
Example: -collection:shared=dir/to/shared
Usage in Code:
import "shared:foo"
```
…--
Marcos Cruz
http://programandala.net
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kelimion
-
Yes, using the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a question, Can I create a prefix in odin (like
core:
orvendor:
). If I want want to import a file, can I just use the file's name?Beta Was this translation helpful? Give feedback.
All reactions