Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

manifold:internal 0.2.0

Contract reference · Payloads · contract.json (crates/manifold-wasm-abi/wit/contract.json)

Status: internal: linked only by hosts built with the contract-internal feature (host tests); refused for mods.

manifold:internal: interfaces for host tests (contract foundation spec §8.4). A host links them only when built with the contract-internal feature, which host tests and the parity harness enable and release builds never do; the import check refuses them everywhere else.

The probe interfaces exercise the old-track machinery before any track is released (spec §6.6, §16.1): wit-synthetic/0.1/internal/ holds a synthetic previous track of this package, a guest built against it has its probe imports served by a generated adapter, and its plugin-probe export is called through a generated facade, on both hosts.

InterfaceKind
plugin-probeexport
probeimport
shapestypes-only

Interface plugin-probe

export · since 0.2.0

The guest export the host calls through a facade. Track 0.2 added the halt case to command, so a track-0.1 guest cannot receive it.

Functions

name

name: func() -> string

The guest’s name and the track it was built for.

run

run: func(cmd: command, c: borrow<counter>) -> result<outcome, string>

Run cmd against c, calling back into probe.

Types

command (variant)

IndexCasePayloadAbout
0stepu32
1jumppoint
2reportlist<string>
3haltnone

counter (alias)

= internal/probe.counter

outcome (record)

FieldTypeAbout
totalu32
lastoption<point>
loglist<string>

point (alias)

= internal/shapes.point

Interface probe

import · since 0.2.0

A host interface with a resource, records, variants, options and lists. Unchanged since track 0.1: its 0.1 adapter is generated.

Resources: counter.

Functions

[constructor]counter

[constructor]counter: func(start: u32) -> own<counter>

[method]counter.bump

[method]counter.bump: func(self: borrow<counter>, by: u32) -> u32

echo

echo: func(e: event) -> list<event>

The events the host saw, e last.

read

read: func(c: borrow<counter>) -> u32

The counter’s value.

record-reading

record-reading: func(r: reading) -> result<u32, string>

Store a reading; its index, or why it was refused.

Types

counter (resource)

A host-owned counter, one Rust host type on every track.

resource

event (variant)

IndexCasePayloadAbout
0movedpoint
1namedstring
2clearednone

marks (alias)

= internal/shapes.marks

point (alias)

= internal/shapes.point

reading (record)

FieldTypeAbout
atpoint
tonetone
marksmarks
noteoption<string>
sampleslist<u16>

tone (alias)

= internal/shapes.tone

Interface shapes

types-only · since 0.2.0

Types shared by the probe interfaces. Identical on every track, so an older track’s bindings map it to the current Rust types with with:.

Types

marks (flags)

BitFlagAbout
0red
1blue

point (record)

FieldTypeAbout
xs32
ys32

tone (enum)

IndexCaseAbout
0low
1high

World probe-guest

A probe guest: imports probe, exports plugin-probe.

Imports:

  • manifold:internal/probe@0.2.0
  • manifold:internal/shapes@0.2.0

Exports:

  • manifold:internal/plugin-probe@0.2.0