Files
cli/vendor/wit-component/tests/interfaces/maps.wat

187 lines
8.3 KiB
Plaintext
Raw Normal View History

(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (map bool string))
(export (;1;) "bool-map" (type (eq 0)))
(type (;2;) (map u8 string))
(export (;3;) "u8-map" (type (eq 2)))
(type (;4;) (map u16 string))
(export (;5;) "u16-map" (type (eq 4)))
(type (;6;) (map u32 string))
(export (;7;) "u32-map" (type (eq 6)))
(type (;8;) (map u64 string))
(export (;9;) "u64-map" (type (eq 8)))
(type (;10;) (map s8 string))
(export (;11;) "s8-map" (type (eq 10)))
(type (;12;) (map s16 string))
(export (;13;) "s16-map" (type (eq 12)))
(type (;14;) (map s32 string))
(export (;15;) "s32-map" (type (eq 14)))
(type (;16;) (map s64 string))
(export (;17;) "s64-map" (type (eq 16)))
(type (;18;) (map char string))
(export (;19;) "char-map" (type (eq 18)))
(type (;20;) (map string u32))
(export (;21;) "string-map" (type (eq 20)))
(type (;22;) (map string bool))
(export (;23;) "string-to-bool" (type (eq 22)))
(type (;24;) (list u8))
(type (;25;) (map string 24))
(export (;26;) "string-to-list" (type (eq 25)))
(type (;27;) (option u32))
(type (;28;) (map string 27))
(export (;29;) "string-to-option" (type (eq 28)))
(type (;30;) (result u32 (error string)))
(type (;31;) (map string 30))
(export (;32;) "string-to-result" (type (eq 31)))
(type (;33;) (tuple u32 string))
(type (;34;) (map string 33))
(export (;35;) "string-to-tuple" (type (eq 34)))
(type (;36;) (map string u32))
(type (;37;) (map string 36))
(export (;38;) "map-of-maps" (type (eq 37)))
(type (;39;) (list 36))
(export (;40;) "list-of-maps" (type (eq 39)))
(type (;41;) (option 36))
(export (;42;) "option-of-map" (type (eq 41)))
(type (;43;) (func (param "x" 36)))
(export (;0;) "map-param" (func (type 43)))
(type (;44;) (func (result 36)))
(export (;1;) "map-result" (func (type 44)))
(type (;45;) (map u32 string))
(type (;46;) (func (param "x" 45) (result 45)))
(export (;2;) "map-roundtrip" (func (type 46)))
)
)
(export (;0;) "foo:maps-test/maps-interface" (instance (type 0)))
)
)
(export (;1;) "maps-interface" (type 0))
(type (;2;)
(component
(type (;0;)
(component
(type (;0;)
(instance
(type (;0;) (map bool string))
(export (;1;) "bool-map" (type (eq 0)))
(type (;2;) (map u8 string))
(export (;3;) "u8-map" (type (eq 2)))
(type (;4;) (map u16 string))
(export (;5;) "u16-map" (type (eq 4)))
(type (;6;) (map u32 string))
(export (;7;) "u32-map" (type (eq 6)))
(type (;8;) (map u64 string))
(export (;9;) "u64-map" (type (eq 8)))
(type (;10;) (map s8 string))
(export (;11;) "s8-map" (type (eq 10)))
(type (;12;) (map s16 string))
(export (;13;) "s16-map" (type (eq 12)))
(type (;14;) (map s32 string))
(export (;15;) "s32-map" (type (eq 14)))
(type (;16;) (map s64 string))
(export (;17;) "s64-map" (type (eq 16)))
(type (;18;) (map char string))
(export (;19;) "char-map" (type (eq 18)))
(type (;20;) (map string u32))
(export (;21;) "string-map" (type (eq 20)))
(type (;22;) (map string bool))
(export (;23;) "string-to-bool" (type (eq 22)))
(type (;24;) (list u8))
(type (;25;) (map string 24))
(export (;26;) "string-to-list" (type (eq 25)))
(type (;27;) (option u32))
(type (;28;) (map string 27))
(export (;29;) "string-to-option" (type (eq 28)))
(type (;30;) (result u32 (error string)))
(type (;31;) (map string 30))
(export (;32;) "string-to-result" (type (eq 31)))
(type (;33;) (tuple u32 string))
(type (;34;) (map string 33))
(export (;35;) "string-to-tuple" (type (eq 34)))
(type (;36;) (map string u32))
(type (;37;) (map string 36))
(export (;38;) "map-of-maps" (type (eq 37)))
(type (;39;) (list 36))
(export (;40;) "list-of-maps" (type (eq 39)))
(type (;41;) (option 36))
(export (;42;) "option-of-map" (type (eq 41)))
(type (;43;) (func (param "x" 36)))
(export (;0;) "map-param" (func (type 43)))
(type (;44;) (func (result 36)))
(export (;1;) "map-result" (func (type 44)))
(type (;45;) (map u32 string))
(type (;46;) (func (param "x" 45) (result 45)))
(export (;2;) "map-roundtrip" (func (type 46)))
)
)
(import "foo:maps-test/maps-interface" (instance (;0;) (type 0)))
(type (;1;)
(instance
(type (;0;) (map bool string))
(export (;1;) "bool-map" (type (eq 0)))
(type (;2;) (map u8 string))
(export (;3;) "u8-map" (type (eq 2)))
(type (;4;) (map u16 string))
(export (;5;) "u16-map" (type (eq 4)))
(type (;6;) (map u32 string))
(export (;7;) "u32-map" (type (eq 6)))
(type (;8;) (map u64 string))
(export (;9;) "u64-map" (type (eq 8)))
(type (;10;) (map s8 string))
(export (;11;) "s8-map" (type (eq 10)))
(type (;12;) (map s16 string))
(export (;13;) "s16-map" (type (eq 12)))
(type (;14;) (map s32 string))
(export (;15;) "s32-map" (type (eq 14)))
(type (;16;) (map s64 string))
(export (;17;) "s64-map" (type (eq 16)))
(type (;18;) (map char string))
(export (;19;) "char-map" (type (eq 18)))
(type (;20;) (map string u32))
(export (;21;) "string-map" (type (eq 20)))
(type (;22;) (map string bool))
(export (;23;) "string-to-bool" (type (eq 22)))
(type (;24;) (list u8))
(type (;25;) (map string 24))
(export (;26;) "string-to-list" (type (eq 25)))
(type (;27;) (option u32))
(type (;28;) (map string 27))
(export (;29;) "string-to-option" (type (eq 28)))
(type (;30;) (result u32 (error string)))
(type (;31;) (map string 30))
(export (;32;) "string-to-result" (type (eq 31)))
(type (;33;) (tuple u32 string))
(type (;34;) (map string 33))
(export (;35;) "string-to-tuple" (type (eq 34)))
(type (;36;) (map string u32))
(type (;37;) (map string 36))
(export (;38;) "map-of-maps" (type (eq 37)))
(type (;39;) (list 36))
(export (;40;) "list-of-maps" (type (eq 39)))
(type (;41;) (option 36))
(export (;42;) "option-of-map" (type (eq 41)))
(type (;43;) (func (param "x" 36)))
(export (;0;) "map-param" (func (type 43)))
(type (;44;) (func (result 36)))
(export (;1;) "map-result" (func (type 44)))
(type (;45;) (map u32 string))
(type (;46;) (func (param "x" 45) (result 45)))
(export (;2;) "map-roundtrip" (func (type 46)))
)
)
(export (;1;) "foo:maps-test/maps-interface" (instance (type 1)))
)
)
(export (;0;) "foo:maps-test/maps-test-world" (component (type 0)))
)
)
(export (;3;) "maps-test-world" (type 2))
(@custom "package-docs" "\01{\22interfaces\22:{\22maps-interface\22:{\22funcs\22:{\22map-param\22:{\22docs\22:\22Functions\22}},\22types\22:{\22bool-map\22:{\22docs\22:\22Test all primitive key types\22},\22string-to-bool\22:{\22docs\22:\22Test all value types\22},\22map-of-maps\22:{\22docs\22:\22Nested structures\22}}}}}")
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)