#![no_std] #![no_main] #[cfg(not(test))] #[panic_handler] fn panic(_info: &core::panic::PanicInfo) -> ! { core::arch::wasm32::unreachable() } #[no_mangle] // The rust compiler will convert this to an iterative algorithm. pub extern "C" fn fibonacci(n: i32) -> i32 { if n <= 1 { return n; } fibonacci(n - 1) + fibonacci(n - 2) }