From c74da485eb8a6cd566310d4630694f7fc593b162 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Tue, 28 May 2024 14:06:51 +0200 Subject: [PATCH] Fix incompatibility in GraalWasm example. --- src/main/java/org/example/embedding/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/example/embedding/Main.java b/src/main/java/org/example/embedding/Main.java index db0534a..b8d91e6 100644 --- a/src/main/java/org/example/embedding/Main.java +++ b/src/main/java/org/example/embedding/Main.java @@ -71,7 +71,7 @@ public static void main(String[] args) throws IOException { break; case "wasm": // with wasm we compute factorial - context.eval(Source.newBuilder("wasm", Main.class.getResource("factorial.wasm")).build()); + context.eval(Source.newBuilder("wasm", Main.class.getResource("factorial.wasm")).name("main").build()); Value factorial = context.getBindings("wasm").getMember("main").getMember("fac"); System.out.println("wasm: factorial(20) = " + factorial.execute(20L)); break;