1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-27 04:38:06 +11:00

Create Module_API.md

This commit is contained in:
Adorable-Catgirl 2019-08-29 14:08:10 -05:00 committed by GitHub
parent 8227baf768
commit 62994661dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

26
docs/Module_API.md Normal file
View File

@ -0,0 +1,26 @@
# Module API
Modules should always follow a normal convention
* Libraries should always put their methods in `envs.libraries.your_library_here`
* Only boot modules are allowed to write the the global table
* Boot menu modules should always use the loaded config (under `envs.entries`) for use in booting, default is always specified under `envs.default`.
* Modules are allowed to be OEFIv2.1 applications, with the architecture `zoryamod` and the `minversion` of `2.0`. It should be noted that the microruntime will have to support loading OEFIv2.1 modules
* Modules that are signed should be CPIO-based.
* Microruntimes are required to have a basic CPIO implementation for signed modules, but they do not need to support checking signature integrity
* CPIO-based modules may only have three files: `signature.bin` (The signature of the module, not required), `manifest.ini` (Manifest file, required), and `init.lua` (Module code, required)
* Only binary CPIOs are supported for use as module containers.
* Compression is not supported for modules
## Module manifest
An example module manifest is as follows
```ini
[ZORYA_MOD]
name=Example Module
modver=1.0
minver=2.0
maxver=*
author=Adorable-Catgirl
url=https://github.com/Adorable-Catgirl/Zorya-NEO
; update_url=optional
```
A semicolon at the beginning of the line specifies a comment.