Pulcedocs

Choose an API

Separate native Go contracts, WIT and client compatibility.

On this page

Typed Content: items and blocks

For ordinary native Go content, use module.TypedContent(ctx) during Load: typed semantic definitions, enabled-stack resource validation, per-protocol lowering and atomic publication/freeze before players. This API documentation follows core commit 8f711a26; source/wire checks do not certify live-client acceptance.

Which path to use

  • core/module: Descriptor → Load → Start → Stop, supplied through host.Options.Modules.
  • core/plugin: Name → Init → Start → Stop; gameplay handles and Context.NewVirtualInventory.
  • WASM: plugin.json, a component, host policy and a separate worker. A Go interface is not an ABI.

Exact module path

Imports
import (
    "github.com/pulce-core/Pulce/core/module"
    "github.com/pulce-core/Pulce/core/plugin"
    "github.com/pulce-core/Pulce/host"
)

Errors and ownership

  • errors.Is(err, plugin.ErrPluginStopped)
  • errors.Is(err, plugin.ErrStaleHandle)
  • errors.Is(err, gameplay.ErrOperationCancelled) — plugin.ErrHandleOperationCancelled is an alias.
  • errors.Is(err, item.ErrInvalidStack)

State is server-owned. Single-slot setters reject invalid, negative and oversized stacks without changing the slot; count=0 clears. Give/Add can distribute counts over multiple slots.

Compatibility checks

Manifest: api/public-packages.txt; snapshot: api/public-api.txt. go run ./tools/apicheck compiles real external consumers and checks snapshot drift. Runtime/network/server internals are not stable plugin API.