This directory contains tests for the core WebAssembly semantics, as described in [Semantics.md](https://github.com/WebAssembly/design/blob/master/Semantics.md) and specified by the [spec interpreter](https://github.com/WebAssembly/spec/blob/master/interpreter/spec). This files should be a direct copy of the original [WebAssembly spec tests](https://github.com/WebAssembly/spec/tree/master/test/core). Tests are written in the [S-Expression script format](https://github.com/WebAssembly/spec/blob/master/interpreter/README.md#s-expression-syntax) defined by the interpreter. ## Autogenerated Rust test cases This files will serve as base for autogenerating Rust testcases when `WASM_GENERATE_SPECTESTS=1 cargo build` is executed ([src/build_spectests.rs](https://github.com/WAFoundation/wasmer/blob/master/src/build_spectests.rs)). The result autogenerated spectests live in the [src/spectests](https://github.com/WAFoundation/wasmer/tree/master/src/spectests) directory. The spectests are slightly modified from the source. This are the current things that are skipped as they are not yet supported: ## Testcases Currently supported command assertions: - [x] Module _mostly implemented_ (it should support named modules `(module $Xx)`). - [x] AssertReturn _mostly implemented_ (it should support calls to named modules `(invoke $Xx "call")`). - [ ] AssertReturnCanonicalNan _not implemented yet_ - [ ] AssertReturnArithmeticNan _not implemented yet_ - [ ] AssertTrap _not implemented yet_ - [x] AssertInvalid _Fully implemented_ (it should not require to do validation separate from compilation) - [x] AssertMalformed _Fully implemented_ - [ ] AssertUninstantiable _not implemented yet_ - [ ] AssertExhaustion _not implemented yet_ - [ ] Register _not implemented yet_ - [ ] PerformAction _not implemented yet_ ### Specific non-supported cases There are some cases that we decided to skip for now to fasten the time to release: - `SKIP_NAN_BITS`: Cases like invokations with params such as: `(f32.const nan:0x200000)` are currently not well supported in tests. Files modified: - `conversions.wast` - `SKIP_MEMORY_GROW`: When accessing to the context memories multiple times, the mutable access to a memory index raises an error. For this reason we decied to skip the tests (for now) until this issue is resolved. Files modified: - `block.wast` - `call_indirect.wast` - `call.wast` - `globals.wast` - `loop.wast`