Fix calculation of param/result types in wit-bindgen (#5622)

This commit fixes a bug in the `bindgen!` macro for components where
previously the `param` and `result` properties weren't properly
calculated depending on the structure of the type and which types were
visited in which order. This is simplified to use a `LiveTypes`
structure from the `wit-parser` crate and relies on that to do necessary
recursion.
This commit is contained in:
Alex Crichton
2023-01-23 13:05:53 -06:00
committed by GitHub
parent ae441c50b6
commit 293005bd64
2 changed files with 41 additions and 87 deletions

View File

@@ -0,0 +1,15 @@
interface wasi-filesystem {
record descriptor-stat {
}
enum errno { e }
create-directory-at: func() -> result<_, errno>
stat: func() -> result<descriptor-stat, errno>
}
default world wasi {
import wasi-filesystem: self.wasi-filesystem
}