Documentation
¶
Overview ¶
Package check decides whether a built mod may run, without a game. It is the check a publishing service runs before it offers a release to players: a WebAssembly mod must keep to the host's imports and start in the host's sandbox limits, an interpreted mod must name a runtime Modlock ships, the settings and metrics a mod declares must be well formed, and its client content must stay in its own addon.
Index ¶
- Constants
- func Addon(manifest *manifestpb.Manifest) string
- func Content(dist fs.FS, addon string) error
- func Mod(ctx context.Context, dist fs.FS) (*manifest.Manifest, error)
- func Module(ctx context.Context, module []byte) error
- func Scripted(dist fs.FS) (string, error)
- func Slug(slug string) error
- func Version(version string) error
Constants ¶
const ContentDir = "panorama"
ContentDir is the built mod's directory of client content: the panorama directory of the mod's content addon, which a player's game mounts while it plays the mod.
const ManifestFile = sandbox.ManifestFile
ManifestFile is the manifest's file name in a built mod.
Variables ¶
This section is empty.
Functions ¶
func Addon ¶ added in v0.1.8
func Addon(manifest *manifestpb.Manifest) string
Addon returns the name of the content addon a release of the mod ships: its slug and version. Panorama keeps each layout it loads for the life of the game, so every release names its own, and a slug belongs to one mod.
func Content ¶ added in v0.1.8
Content checks that every file in dist's content directory lies in the addon's directory of its kind, panorama/<kind>/<addon>/, so one mod's content never replaces another's or the game's.
func Module ¶
Module checks that module keeps to the host's boundary and starts within the host's memory and time limits with every host request answered empty.
func Scripted ¶ added in v0.1.8
Scripted returns the first file of dist's client content that runs code in a player's game, or "" when none does. A script runs code, and so does a layout that loads a script, holds one inline or handles an event. A layout this package cannot read counts as running code, so a publishing service can hold scripted content for creators it trusts.
Types ¶
This section is empty.