From 83d53ba0f54b4dc744d1da04497e19089f2a8f88 Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Tue, 3 Sep 2024 19:54:16 +0200 Subject: [PATCH] Fix wasm tutorial --- docs/docs/how-to/web-assembly.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/how-to/web-assembly.md b/docs/docs/how-to/web-assembly.md index 09a0d8f34..6d696900a 100644 --- a/docs/docs/how-to/web-assembly.md +++ b/docs/docs/how-to/web-assembly.md @@ -70,7 +70,7 @@ WebAssembly.instantiateStreaming(fetch('main.wasm')) .then((results) => { // WebAssembly const startWasm = window.performance.now(); - let result = results.instance.exports._Z4fiboi(fiboBase); // Use the mangled name here + let result = results.instance.exports.fibo(fiboBase); const stopWasm = window.performance.now(); console.log("Fibonacci Spice wasm: " + result); console.log("Duration (millis): " + (stopWasm - startWasm)); @@ -110,4 +110,4 @@ Fibonacci JS: 1134903170 Duration (millis): 8946.19999999553 ``` -Congrats on your first WebAssembly project in Spice! \ No newline at end of file +Congrats on your first WebAssembly project in Spice!