Skip to content

Adding a note to WIT.md about WIT interface version interop & host downgrades #609

@vados-cosmonic

Description

@vados-cosmonic

Hey all,

So thinking about interfaces in WIT it seems clear that there are two somewhat surprising eventualities that happen in hosts today (wasmtime, jco at the very least):

  1. Linked interfaces may be downgraded to match what is in the host (i.e. ns:pkg/iface@0.2.1 being downgraded to ns:pkg/iface@0.2.0)
  2. Partly due to (1) but in general adding functions to an existing interface (even with @since) could become a breaking change, because guests cannot predict whether hosts will have coverage or not.

This should likely be called out more clearly in WIT.md, similar to how it is called out explicitly in wasmtime's Linker documentation -- thoughts?

The ideal is to prevent people from being surprised when building components that target the newest version of a given interface but running in an older host/embedding and experiencing an unexpected runtime failure.

Downgrading is a host-specific quirk, and is technically not promised/required by a given platform (no guest can ensure that a certain platform does a certain thing with it's imports), but it is still surprising behavior that should probably be noted somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions