Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make primitive tests go back and forth, fix float params in imported …
…functions (#188) * Make primitive tests go back and forth (broken floats) This reveals 2 issues: 1) Floats are not passed properly when the guest calls a host function, see #180 2) The tests were not robust enough to catch that. This commit at least partially fixes the second problem. Also, the tested functions now have more intuitive names and do not rely on "magic" constants. * Pass float argument to imported function as a one-sized array This works around this issue: #180 Thankfully it seems to be fixed in wasmer3, so this code will probably need to change again in the wasmer3 branch to no longer use this hack. * Split primitive float methods for wasmer2 workaround Since the wasmer2 bug affect only one runtime, it felt wrong to change the float primitive methods to accommodate it. Instead, there are now 2 primitive float methods, one "normal" one, and one with the workaround implemented. The wasmer2 runtime simply calls the one with the workaround instead. Other runtimes can then call the normal one as usual. * Update bindings test snapshot * Update wasmer test * Update ts runtime tests * Update ts runtime imports * Use the wasmer2 workaround in ts runtime as well * Fix missing quote in status text * Summarize changes into changelog
- Loading branch information