Update wasm-tools dependencies (#4970)

* Update wasm-tools dependencies

This update brings in a number of features such as:

* The component model binary format and AST has been slightly adjusted
  in a few locations. Names are dropped from parameters/results now in
  the internal representation since they were not used anyway. At this
  time the ability to bind a multi-return function has not been exposed.

* The `wasmparser` validator pass will now share allocations with prior
  functions, providing what's probably a very minor speedup for Wasmtime
  itself.

* The text format for many component-related tests now requires named
  parameters.

* Some new relaxed-simd instructions are updated to be ignored.

I hope to have a follow-up to expose the multi-return ability to the
embedding API of components.

* Update audit information for new crates
This commit is contained in:
Alex Crichton
2022-09-27 13:12:34 -05:00
committed by GitHub
parent 10deb9b7fe
commit 29c7de7340
31 changed files with 407 additions and 331 deletions

View File

@@ -60,10 +60,10 @@ fn typecheck() -> Result<()> {
(func (export "thunk")
(canon lift (core func $i "thunk"))
)
(func (export "tuple-thunk") (param (tuple)) (result (tuple))
(func (export "tuple-thunk") (param "a" (tuple)) (result (tuple))
(canon lift (core func $i "thunk"))
)
(func (export "take-string") (param string)
(func (export "take-string") (param "a" string)
(canon lift (core func $i "take-string") (memory $i "memory") (realloc (func $i "realloc")))
)
(func (export "take-two-args") (param "a" s32) (param "b" (list u8))
@@ -154,14 +154,14 @@ fn integers() -> Result<()> {
(func (export "ret-i32-100000") (result i32) i32.const 100000)
)
(core instance $i (instantiate (module $m)))
(func (export "take-u8") (param u8) (canon lift (core func $i "take-i32-100")))
(func (export "take-s8") (param s8) (canon lift (core func $i "take-i32-100")))
(func (export "take-u16") (param u16) (canon lift (core func $i "take-i32-100")))
(func (export "take-s16") (param s16) (canon lift (core func $i "take-i32-100")))
(func (export "take-u32") (param u32) (canon lift (core func $i "take-i32-100")))
(func (export "take-s32") (param s32) (canon lift (core func $i "take-i32-100")))
(func (export "take-u64") (param u64) (canon lift (core func $i "take-i64-100")))
(func (export "take-s64") (param s64) (canon lift (core func $i "take-i64-100")))
(func (export "take-u8") (param "a" u8) (canon lift (core func $i "take-i32-100")))
(func (export "take-s8") (param "a" s8) (canon lift (core func $i "take-i32-100")))
(func (export "take-u16") (param "a" u16) (canon lift (core func $i "take-i32-100")))
(func (export "take-s16") (param "a" s16) (canon lift (core func $i "take-i32-100")))
(func (export "take-u32") (param "a" u32) (canon lift (core func $i "take-i32-100")))
(func (export "take-s32") (param "a" s32) (canon lift (core func $i "take-i32-100")))
(func (export "take-u64") (param "a" u64) (canon lift (core func $i "take-i64-100")))
(func (export "take-s64") (param "a" s64) (canon lift (core func $i "take-i64-100")))
(func (export "ret-u8") (result u8) (canon lift (core func $i "ret-i32-0")))
(func (export "ret-s8") (result s8) (canon lift (core func $i "ret-i32-0")))
@@ -420,7 +420,7 @@ fn type_layers() -> Result<()> {
)
)
(core instance $i (instantiate $m))
(func (export "take-u32") (param u32) (canon lift (core func $i "take-i32-100")))
(func (export "take-u32") (param "a" u32) (canon lift (core func $i "take-i32-100")))
)
"#;
@@ -472,16 +472,16 @@ fn floats() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "f32-to-u32") (param float32) (result u32)
(func (export "f32-to-u32") (param "a" float32) (result u32)
(canon lift (core func $i "i32.reinterpret_f32"))
)
(func (export "f64-to-u64") (param float64) (result u64)
(func (export "f64-to-u64") (param "a" float64) (result u64)
(canon lift (core func $i "i64.reinterpret_f64"))
)
(func (export "u32-to-f32") (param u32) (result float32)
(func (export "u32-to-f32") (param "a" u32) (result float32)
(canon lift (core func $i "f32.reinterpret_i32"))
)
(func (export "u64-to-f64") (param u64) (result float64)
(func (export "u64-to-f64") (param "a" u64) (result float64)
(canon lift (core func $i "f64.reinterpret_i64"))
)
)
@@ -545,10 +545,10 @@ fn bools() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "u32-to-bool") (param u32) (result bool)
(func (export "u32-to-bool") (param "a" u32) (result bool)
(canon lift (core func $i "pass"))
)
(func (export "bool-to-u32") (param bool) (result u32)
(func (export "bool-to-u32") (param "a" bool) (result u32)
(canon lift (core func $i "pass"))
)
)
@@ -584,10 +584,10 @@ fn chars() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "u32-to-char") (param u32) (result char)
(func (export "u32-to-char") (param "a" u32) (result char)
(canon lift (core func $i "pass"))
)
(func (export "char-to-u32") (param char) (result u32)
(func (export "char-to-u32") (param "a" char) (result u32)
(canon lift (core func $i "pass"))
)
)
@@ -722,21 +722,21 @@ fn strings() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "list8-to-str") (param (list u8)) (result string)
(func (export "list8-to-str") (param "a" (list u8)) (result string)
(canon lift
(core func $i "roundtrip")
(memory $i "memory")
(realloc (func $i "realloc"))
)
)
(func (export "str-to-list8") (param string) (result (list u8))
(func (export "str-to-list8") (param "a" string) (result (list u8))
(canon lift
(core func $i "roundtrip")
(memory $i "memory")
(realloc (func $i "realloc"))
)
)
(func (export "list16-to-str") (param (list u16)) (result string)
(func (export "list16-to-str") (param "a" (list u16)) (result string)
(canon lift
(core func $i "roundtrip")
string-encoding=utf16
@@ -744,7 +744,7 @@ fn strings() -> Result<()> {
(realloc (func $i "realloc"))
)
)
(func (export "str-to-list16") (param string) (result (list u16))
(func (export "str-to-list16") (param "a" string) (result (list u16))
(canon lift
(core func $i "roundtrip")
string-encoding=utf16
@@ -1001,10 +1001,10 @@ fn some_traps() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "take-list-unreachable") (param (list u8))
(func (export "take-list-unreachable") (param "a" (list u8))
(canon lift (core func $i "take-list") (memory $i "memory") (realloc (func $i "realloc")))
)
(func (export "take-string-unreachable") (param string)
(func (export "take-string-unreachable") (param "a" string)
(canon lift (core func $i "take-list") (memory $i "memory") (realloc (func $i "realloc")))
)
@@ -1034,10 +1034,10 @@ fn some_traps() -> Result<()> {
)
(core instance $i2 (instantiate $m2))
(func (export "take-list-base-oob") (param (list u8))
(func (export "take-list-base-oob") (param "a" (list u8))
(canon lift (core func $i2 "take-list") (memory $i2 "memory") (realloc (func $i2 "realloc")))
)
(func (export "take-string-base-oob") (param string)
(func (export "take-string-base-oob") (param "a" string)
(canon lift (core func $i2 "take-list") (memory $i2 "memory") (realloc (func $i2 "realloc")))
)
(func (export "take-many-base-oob") (type $t)
@@ -1054,10 +1054,10 @@ fn some_traps() -> Result<()> {
)
(core instance $i3 (instantiate $m3))
(func (export "take-list-end-oob") (param (list u8))
(func (export "take-list-end-oob") (param "a" (list u8))
(canon lift (core func $i3 "take-list") (memory $i3 "memory") (realloc (func $i3 "realloc")))
)
(func (export "take-string-end-oob") (param string)
(func (export "take-string-end-oob") (param "a" string)
(canon lift (core func $i3 "take-list") (memory $i3 "memory") (realloc (func $i3 "realloc")))
)
(func (export "take-many-end-oob") (type $t)
@@ -1453,23 +1453,23 @@ fn option() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "option-unit-to-u32") (param (option (tuple))) (result u32)
(func (export "option-unit-to-u32") (param "a" (option (tuple))) (result u32)
(canon lift (core func $i "pass0"))
)
(func (export "option-u8-to-tuple") (param (option u8)) (result "a" u32) (result "b" u32)
(func (export "option-u8-to-tuple") (param "a" (option u8)) (result "a" u32) (result "b" u32)
(canon lift (core func $i "pass1") (memory $i "memory"))
)
(func (export "option-u32-to-tuple") (param (option u32)) (result "a" u32) (result "b" u32)
(func (export "option-u32-to-tuple") (param "a" (option u32)) (result "a" u32) (result "b" u32)
(canon lift (core func $i "pass1") (memory $i "memory"))
)
(func (export "option-string-to-tuple") (param (option string)) (result "a" u32) (result "b" string)
(func (export "option-string-to-tuple") (param "a" (option string)) (result "a" u32) (result "b" string)
(canon lift
(core func $i "pass2")
(memory $i "memory")
(realloc (func $i "realloc"))
)
)
(func (export "to-option-unit") (param u32) (result (option (tuple)))
(func (export "to-option-unit") (param "a" u32) (result (option (tuple)))
(canon lift (core func $i "pass0"))
)
(func (export "to-option-u8") (param "a" u32) (param "b" u32) (result (option u8))
@@ -1646,21 +1646,21 @@ fn expected() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "take-expected-unit") (param (result)) (result u32)
(func (export "take-expected-unit") (param "a" (result)) (result u32)
(canon lift (core func $i "pass0"))
)
(func (export "take-expected-u8-f32") (param (result u8 (error float32))) (result "a" u32) (result "b" u32)
(func (export "take-expected-u8-f32") (param "a" (result u8 (error float32))) (result "a" u32) (result "b" u32)
(canon lift (core func $i "pass1") (memory $i "memory"))
)
(type $list (list u8))
(func (export "take-expected-string") (param (result string (error $list))) (result "a" u32) (result "b" string)
(func (export "take-expected-string") (param "a" (result string (error $list))) (result "a" u32) (result "b" string)
(canon lift
(core func $i "pass2")
(memory $i "memory")
(realloc (func $i "realloc"))
)
)
(func (export "to-expected-unit") (param u32) (result (result))
(func (export "to-expected-unit") (param "a" u32) (result (result))
(canon lift (core func $i "pass0"))
)
(func (export "to-expected-s16-f32") (param "a" u32) (param "b" u32) (result (result s16 (error float32)))
@@ -1782,7 +1782,7 @@ fn fancy_list() -> Result<()> {
(type $b (result (error string)))
(type $input (list (tuple $a $b)))
(func (export "take")
(param $input)
(param "a" $input)
(result "ptr" u32)
(result "len" u32)
(result "list" (list u8))
@@ -2226,7 +2226,7 @@ fn lower_then_lift() -> Result<()> {
let component = format!(
r#"
(component $c
(import "s" (func $f (param string)))
(import "s" (func $f (param "a" string)))
(core module $libc
(memory (export "memory") 1)
@@ -2237,7 +2237,7 @@ fn lower_then_lift() -> Result<()> {
(core func $f_lower
(canon lower (func $f) (memory $libc "memory"))
)
(func $f2 (param string)
(func $f2 (param "a" string)
(canon lift (core func $f_lower)
(memory $libc "memory")
(realloc (func $libc "realloc"))
@@ -2266,7 +2266,7 @@ fn lower_then_lift() -> Result<()> {
let component = format!(
r#"
(component $c
(import "s2" (func $f (param string) (result u32)))
(import "s2" (func $f (param "a" string) (result u32)))
(core module $libc
(memory (export "memory") 1)
@@ -2277,7 +2277,7 @@ fn lower_then_lift() -> Result<()> {
(core func $f_lower
(canon lower (func $f) (memory $libc "memory"))
)
(func $f2 (param string) (result string)
(func $f2 (param "a" string) (result string)
(canon lift (core func $f_lower)
(memory $libc "memory")
(realloc (func $libc "realloc"))
@@ -2328,7 +2328,7 @@ fn errors_that_poison_instance() -> Result<()> {
(memory (export "m") 1)
)
(core instance $m2 (instantiate $m2))
(func (export "f3") (param string)
(func (export "f3") (param "a" string)
(canon lift (core func $m2 "f") (realloc (func $m2 "r")) (memory $m2 "m"))
)
@@ -2398,7 +2398,7 @@ fn errors_that_poison_instance() -> Result<()> {
fn run_export_with_internal_adapter() -> Result<()> {
let component = r#"
(component
(type $t (func (param u32) (result u32)))
(type $t (func (param "a" u32) (result u32)))
(component $a
(core module $m
(func (export "add-five") (param i32) (result i32)