feat: add a histrical wit-bindgen

This commit is contained in:
2023-01-01 00:25:48 +08:00
parent 01e8f5a959
commit aa50d63aec
419 changed files with 45283 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
test-imports: func()
roundtrip-option: func(a: option<float32>) -> option<u8>
roundtrip-result: func(a: expected<u32, float32>) -> expected<float64, u8>
enum e1 { a, b }
roundtrip-enum: func(a: e1) -> e1
invert-bool: func(a: bool) -> bool
variant c1 { a(s32), b(s64) }
variant c2 { a(s32), b(float32) }
variant c3 { a(s32), b(float64) }
variant c4 { a(s64), b(float32) }
variant c5 { a(s64), b(float64) }
variant c6 { a(float32), b(float64) }
type casts = tuple<c1, c2, c3, c4, c5, c6>
variant-casts: func(a: casts) -> casts
variant z1 { a(s32), b }
variant z2 { a(s64), b }
variant z3 { a(float32), b }
variant z4 { a(float64), b }
type zeros = tuple<z1, z2, z3, z4>
variant-zeros: func(a: zeros) -> zeros
type option-typedef = option<u32>
type bool-typedef = bool
type result-typedef = expected<u32, unit>
variant-typedefs: func(a: option-typedef, b: bool-typedef, c: result-typedef)