Closed rylev closed 1 year ago
Was able to get support in for records, enums and variants, and it seems to work fairly well. Going to merge this.
Cool. I've been slowly working on a standalone parser & writer for the syntax too with the hope of eventually upstreaming it into wasm-tools.
Adds docs written by @lann for how to encode literal values for all the various wit types. Once this is merged we can update the parser to handle this.
One interesting thing will be that in this proposal some the type of literals are not ambiguous. For example:
1
can be any of the various integer types. "hello" can be astring
,option<string>
result<string>
and more. We'll have to see if this causes problems and perhaps make the encoding more strict if it does.