* Update WIT tooling used by Wasmtime This commit updates the WIT tooling, namely the wasm-tools family of crates, with recent updates. Notably: * bytecodealliance/wasm-tools#867 * bytecodealliance/wasm-tools#871 This updates index spaces in components and additionally bumps the minimum required version of the component binary format to be consumed by Wasmtime (because of the index space changes). Additionally WIT tooling now fully supports `use`. Note that WIT tooling doesn't, at this time, fully support packages and depending on remotely defined WIT packages. Currently WIT still needs to be vendored in the project. It's hoped that future work with `cargo component` and possible integration here could make the story about depending on remotely-defined WIT more ergonomic and streamlined. * Fix `bindgen!` codegen tests * Add a test for `use` paths an implement support * Update to crates.io versions of wasm-tools * Uncomment codegen tests
60 lines
1.2 KiB
Plaintext
60 lines
1.2 KiB
Plaintext
interface records {
|
|
tuple-arg: func(x: tuple<char, u32>)
|
|
tuple-result: func() -> tuple<char, u32>
|
|
|
|
record empty {}
|
|
|
|
empty-arg: func(x: empty)
|
|
empty-result: func() -> empty
|
|
|
|
/// A record containing two scalar fields
|
|
/// that both have the same type
|
|
record scalars {
|
|
/// The first field, named a
|
|
a: u32,
|
|
/// The second field, named b
|
|
b: u32,
|
|
}
|
|
|
|
scalar-arg: func(x: scalars)
|
|
scalar-result: func() -> scalars
|
|
|
|
/// A record that is really just flags
|
|
/// All of the fields are bool
|
|
record really-flags {
|
|
a: bool,
|
|
b: bool,
|
|
c: bool,
|
|
d: bool,
|
|
e: bool,
|
|
f: bool,
|
|
g: bool,
|
|
h: bool,
|
|
i: bool,
|
|
}
|
|
|
|
flags-arg: func(x: really-flags)
|
|
flags-result: func() -> really-flags
|
|
|
|
record aggregates {
|
|
a: scalars,
|
|
b: u32,
|
|
c: empty,
|
|
d: string,
|
|
e: really-flags,
|
|
}
|
|
|
|
aggregate-arg: func(x: aggregates)
|
|
aggregate-result: func() -> aggregates
|
|
|
|
type tuple-typedef = tuple<s32>
|
|
type int-typedef = s32
|
|
type tuple-typedef2 = tuple<int-typedef>
|
|
typedef-inout: func(e: tuple-typedef2) -> s32
|
|
}
|
|
|
|
default world the-world {
|
|
import imports: self.records
|
|
export exports: self.records
|
|
}
|