Skip to content

Importing Modules

In Rune modules are defined as seperate files with their own collections and data, no different from a regular program. To import the collections of one file to another use the following syntax:

import path/to/file.rn

This will import all data from that module as if it was defined in the current file, so any normal specifier will work. Be careful not to have name conflicts in your collections. Also note that if you don't want the import to execute a function automatically from the imported file, dont call a function in the root of the module. So just write the collections without ever using them and then import them and use them in your main file.