wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

Switch old-witx-compat over to the witx crate on crates.io

Open Michael-F-Bryan opened this issue 4 years ago • 2 comments

This implements the changes mentioned in https://github.com/bytecodealliance/witx-bindgen/issues/85#issuecomment-945938217 for switching witx2's old-witx-compat parser back to using the witx crate from crates.io.

Fixes #85.

Michael-F-Bryan avatar Nov 09 '21 17:11 Michael-F-Bryan

@alexcrichton, how would I handle an old::DeclSyntax::Module(_)? From the source code, it looks like a module is some sort of namespacing feature, but it doesn't look like there is any equivalent in witx2.

I could implement some sort of "Scope" mechanism where entering a module pushes onto the stack and we use that stack whenever we need to convert names, but I have no idea if that makes sense for witx2.

Michael-F-Bryan avatar Nov 09 '21 17:11 Michael-F-Bryan

IIRC you can transparently step into a Module since a document contains at most one module, so I think it's basically just peeled? I forget precisely what it corresponds to though...

alexcrichton avatar Nov 09 '21 19:11 alexcrichton

I'm going to close this since the old-witx-compat feature has since been removed and I don't think we are going to want to add it back soon either.

alexcrichton avatar Sep 01 '22 19:09 alexcrichton