The WebAssembly module step: runs a compiled module the user uploads into the step itself, on the request or the response, in a fresh WebAssembly instance per call. What it returns goes where its To rows say, as a language step's returned value does.
The module belongs to the step, as a script belongs to a Script step:
it is stored once per tenant by digest (Plugin.Provisional.Files)
and the step's settings pin the digest, so a pipeline revision pins
one exact module and the revision history is the module's history.
There is no catalogue of modules apart from the steps.
Everything else is the WebAssembly framework's
(PluginWasmFramework.Language with step_module?: true): the
settings, the run, the configuration text handed to the module as its
source and checked on save by its alternera_check, the named
parameters it declares and the step binds (PluginWasmFramework.Uses),
the upload and its checks (PluginWasmFramework.Upload) and the editor
(PluginWasmFramework.StepEditor). This module names the plugin and
reads its guards from the node's config (upload_settings/0).
Experimental: installed only with :experimental_plugins set
(Pipelines.PluginRegistry) until the runtime binding is chosen.
Summary
Functions
The language the framework runs this step as.
The node's guards on uploads, from the application env of
:alternera_plugin_wasm_module (config/runtime.exs sets them from
the environment): uploads_enabled (true), max_module_bytes (8 MiB),
uploads_per_minute (10 new modules a tenant compiles a minute on
this node) and max_tenant_bytes (256 MiB of a tenant's stored
modules).
Functions
@spec language() :: Alternera.PluginWasmFramework.Language.t()
The language the framework runs this step as.
@spec upload_settings() :: Alternera.PluginWasmFramework.Upload.settings()
The node's guards on uploads, from the application env of
:alternera_plugin_wasm_module (config/runtime.exs sets them from
the environment): uploads_enabled (true), max_module_bytes (8 MiB),
uploads_per_minute (10 new modules a tenant compiles a minute on
this node) and max_tenant_bytes (256 MiB of a tenant's stored
modules).