Skip to content

Commit

Permalink
Fix incompatibility in GraalWasm example.
Browse files Browse the repository at this point in the history
  • Loading branch information
chumer committed May 28, 2024
1 parent f4206f4 commit caa96e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/example/embedding/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit caa96e2

Please sign in to comment.