Make witx document describing wasi spec available as the wasi-spec crate
#97
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #96
Over in Lucet, we need to consume the
witxdescription of the WASI spec in several different rust crates. Rather than put each crate in charge of finding and parsing.witxfiles from the filesystem, and and to provide an easy mechanism to use the same version of the spec across the project, I have created thewasi-speccrate in this project.wasi-spechas a build.rs step to serialize the witx document into a single file, and usesinclude_str!andwitx::parseto make the document available in the crate. At the moment it only packageswasi_unstable_preview0. We can package the other phases as well if desired.I'm not sure if packaging the spec as a crate is exactly the right thing to do, but it is useful to me, and might be useful to others as well, so I figured it can live here rather than in the Lucet crate. I am open to feedback about whether this is the right way to package it or the right place for this code to live.