2022-01-13 08:54:33 -06:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
2022-02-09 07:08:40 -06:00
|
|
|
#![deny(improper_ctypes)]
|
2022-01-13 08:54:33 -06:00
|
|
|
|
2022-02-09 07:08:40 -06:00
|
|
|
#[macro_use]
|
|
|
|
mod libwasm;
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
fn start() -> i32 {
|
|
|
|
let ret = unsafe { add(1, 2) };
|
|
|
|
|
|
|
|
info!(b"hello");
|
|
|
|
|
|
|
|
ret as i32
|
|
|
|
}
|
2022-01-13 08:54:33 -06:00
|
|
|
|
2022-01-16 09:23:19 -06:00
|
|
|
use core::panic::PanicInfo;
|
2022-02-09 07:08:40 -06:00
|
|
|
|
2022-01-13 08:54:33 -06:00
|
|
|
#[panic_handler]
|
|
|
|
fn panic(_info: &PanicInfo) -> ! {
|
|
|
|
loop {}
|
|
|
|
}
|