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;