Skip to content

Conversation

@sunfishcode
Copy link
Member

This implements a basic syntax for resource subtyping, using the
implements keyword:

resource file implements preopen {
   ...
}

I'm not attached to this specific syntax or keyword name, but it is
useful to have something that we can start using to mock up wit files.

This implements a basic syntax for [resource subtyping], using the
`implements` keyword:

```
resource file implements preopen {
   ...
}
```

I'm not attached to this specific syntax or keyword name, but it is
useful to have something that we can start using to mock up wit files.

[resource subtyping]: WebAssembly/component-model#60
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is small enough that it seems fine to throw in, but in general I have no idea how this will map to all the various features of each language and how usage will look like in the component model. Resources are already complicated enough as-is and not fully implemented anywhere (or spec'd), but do you have an idea in mind for how this will work out in all the generators in the long run?

@sunfishcode
Copy link
Member Author

I don't have a full vision for how this works in all the generators yet. I expect we'll do the work of fully fleshing out how these work when we add handles to the canonical ABI.

@alexcrichton alexcrichton merged commit d31c4e3 into bytecodealliance:main Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants