Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a "spec" test suite that can run against arbitrary guest implementations #7

Open
avidal opened this issue Nov 12, 2020 · 1 comment

Comments

@avidal
Copy link
Owner

avidal commented Nov 12, 2020

Fastly has official support for Rust, and beta support for AssemblyScript. I think it'd be interesting to have a spec test which can run against wasm binaries produced by both source languages. Coincidentally, this could also be used by anyone developing their own guest bindings for other languages.

My idea is to have a series of defined endpoints, one for each test, where (ideally) each test isolates to a minimal subset of the ABI. There would be a corresponding implementation of these endpoints for each source language. Implementations could write a response with a specific status code as the default response to indicate that a particular test isn't implemented.

For example, there could be a test for dictionaries. Implementations would provide handlers for /dictionaries that are supposed to open a specific dictionary, get a key, and return the value of that key. If a particular implementation does not yet have dictionary support, it could instead write back a 501 Not Implemented to signal to the test runner that it should be skipped.

@avidal
Copy link
Owner Author

avidal commented Nov 24, 2020

I think I'm going to work on this next. I'd like to bring in an AssemblyScript guest program for tests and having a "standard" test suite will be nice, distinct from an example wasm program.

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

No branches or pull requests

1 participant