Avoid needlessly copying data from wasm into the host for output parameters, and factor out the `.unwrap()` for translating pointers when writing to output parameters.
Avoid needlessly copying data from wasm into the host for output parameters, and factor out the `.unwrap()` for translating pointers when writing to output parameters.