Skip to content

Allow component targets to validate a binary in a semver-compatible manner #2220

@julienvincent

Description

@julienvincent

Currently the wasm-tools component targets command only allows validating that a component targets a specific world exactly. This means that all interface semver versions need to match one-for-one.

Some interfaces, such as WASI, only require the minor (0.2 vs 0.2.3) for compatibility. Additionally, some languages compile to different WASI interface versions depending on what subset of the stdlib is used. This makes it non-deterministic and impossible to consistently validate.

This is a feature request to allow specifying the semver compatibility requirement to use when validating target worlds.

Ideally this is done in a way where different compatibility requirements can be specified for different interfaces present in the target world. The WASI convention of allowing compatibility with the minor is not common to all WIT interfaces AFAIU. Meaning some interfaces might require strict semver version matching (not sure about this one though).

@alexcrichton Pinging you here as you seem to be the person driving this subset of behaviour - anything to add?

See original zulipchat discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    witrelated to the `*.wit` text format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions