Universa U8 module
Creating a module
Consider creating a U8 module using the example of creating a module jslib.u8m . The module jslib.u8m can be found in the u8 project. The jslib.u8m module includes all developed subsystems and add-ons for u8, such as: Node, UBotServer, DNS and so on. Using the example of creating the u8 module, the user can create his own module using his subsystem, the name of the module and add the necessary resources (files) to the module.
To create the jslib.u8m module, you must place the /jslib and /u8scripts directories of the u8 project in the zip archive and change the archive extension to .U8m.
Next, to create the U8 module, you need to add a signature to the archive. In order to sign the U8 module, run the following command:
u8 —signmodule <module path> <key path>
During the launch of the U8 module, u8 checks the signature of the module. All u8 scripts required by the module are searched inside the module. And also U8 has special methods for loading resources (files) from the module.
To run code from the U8 module, you must specify the path to the script inside the module. For example: