Skip to content
This repository was archived by the owner on Dec 7, 2024. It is now read-only.
This repository was archived by the owner on Dec 7, 2024. It is now read-only.

How should features be specified? #3

@tlively

Description

@tlively

The purpose of this proposal is to allow modules to validate even when they conditionally use instructions not supported by the engine, but the spec so far has no concept of optional or unsupported instructions. All instructions are currently either mandatory or do not exist as far as the spec is concerned.

One solution would be to avoid adding a concept of features to the normative spec, to specify features.supported and feature_block as succeeding if the feature bitvector is a particular constant and failing otherwise, and relying on non-normative text to document what each feature actually means. This is not a very satisfying solution because we want feature detection to be as well-specified and portable as any other part of WebAssembly.

A better option would be to add a notion of features to the spec, tag (every?) instruction with the feature(s?) it belongs to, and explicitly allow implementations to choose whether or not to support each feature. The spec would essentially be parameterized by the supported features.

Are there any problems with that approach? Are there better alternatives? @rossberg, I'd be particularly interested in your thoughts here.

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