addon

package
v0.0.0-...-cfb4354 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: Zlib Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface = internal.Addon

Interface is the interface via which an addon is loaded into a VM.

Addons in iolang are separate packages, which may be linked dynamically (on platforms supporting -buildmode=plugin) or statically. The addon is loaded by calling its IoAddon function, which must be of type func() Interface. This function will be called no more than once per interpreter. The plugin itself is opened only once per program, so its init functions may run less than once per time it is added to an interpreter.

For dynamically loaded addons, the Io program's Importer uses a CFunction to lookup the IoAddon function in the plugin when needed. For statically linked addons, however, the program which creates the VM must manually load all addons using the VM's LoadAddon method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL