WebAssembly / component-model

Repository for design and specification of the Component Model
Other
933 stars 79 forks source link

Initial implementation of resource type validation #192

Open pl-semiotics opened 1 year ago

pl-semiotics commented 1 year ago

This adds a relatively direct OCaml implementation of the current formalisation (essentially that given in #101), focusing on the rules around how resource types are treated as creating quantified component types.

It is designed to layer cleanly around the Core WebAssembly reference interpreter, but presently requires minor changes to expose certain parsing-related information and entrypoints.

lukewagner commented 1 year ago

Sorry for the slow reply, but excited to check this out! Could you perhaps add a README.md to the interpreter/ directory giving step-by-step instructions (for Linux and MacOS, ideally) to go from "I've checked out this repo" to "I'm running the test suite"?

lukewagner commented 1 year ago

One other thing that would be super-useful is to see if this reference interpreter can run the tests in wasm-tools/tests/local/component-model and wasmtime/tests/misc-testsuite/component-model. The error strings won't match of course, so we can start by ignoring error string equality. But once the reference interpreter agrees, we'll get a bunch of coverage from importing them into the reference test suite.