String values returned from Guile procedures not typed as strings in JavaScript
Hi all,
I've noticed that when a Guile procedure returns a string, that value is not typed as a string in the JavaScript code. (Or possibly returned at all.)
e.g.
;; foo.scm, compiled with guild compile-wasm foo.scm -o foo.wasm
(string-append "a" "b")
;; js wrapper
async function load() {
const [foo] = await Scheme.load_main("foo.wasm");
console.log(foo);
}
window.addEventListener("load", load);
Expected result: ab
printed to browser console
Actual result: Object { reflector: {}, obj: WasmStructObject }
printed to console.
If (string-append "a" "b")
is replaced with "ab"
, the behavior is as expected. The behavior is also as expected if Hoot is the one to run the Wasm bundle, such as guild compile-wasm ... --run
.
I'm simultaneously new to Hoot, JavaScript, and Wasm, so apologies if I'm just doing something silly.
I'm on Hoot 0.6.0, LibreWolf 135.