Michael Paus
01/26/2025, 11:00 AMimport org.teavm.jso.JSExport;
public class j_fibonacci {
@JSExport
public static int fibonacci(int n) {
int a = 0;
int b = 1;
int tmp;
for (int i = 2; i <= n; ++i) {
tmp = a + b;
a = b;
b = tmp;
}
return b;
}
}
but failed completely. Has anybody else tried that with more success? I tried the same with a corresponding C version of the above example compiled via Emscripten and that worked without problems. A Rust version also works.Charlie Tapping
01/28/2025, 10:23 AMMichael Paus
01/28/2025, 10:54 AM