Skip to content

Instantly share code, notes, and snippets.

@kdkanishka
Created January 24, 2020 09:32
Show Gist options
  • Save kdkanishka/1b1cd8b05340e56b267c78e34fbc8bab to your computer and use it in GitHub Desktop.
Save kdkanishka/1b1cd8b05340e56b267c78e34fbc8bab to your computer and use it in GitHub Desktop.
Simple C program that can be compiled into WebAssembly
#include <stdio.h>
#include <emscripten.h>
int EMSCRIPTEN_KEEPALIVE fib(int n){
if(n == 0 || n == 1)
return 1;
else
return fib(n - 1) + fib(n - 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment