Had some misunderstandings of the quickjs interface in rust in this code. This fixes the problem. However I think a longer term fix would be to move more of this code up into the polyfill / prelude area: https://github.com/extism/js-pdk/tree/main/crates/core/src/prelude
The reason being that more of our validation and preparation logic should be written in JS rather than rust because it's more ergonomic and the error messages are better.
Fixes #36
Had some misunderstandings of the quickjs interface in rust in this code. This fixes the problem. However I think a longer term fix would be to move more of this code up into the polyfill / prelude area: https://github.com/extism/js-pdk/tree/main/crates/core/src/prelude
The reason being that more of our validation and preparation logic should be written in JS rather than rust because it's more ergonomic and the error messages are better.