2022-04-09 16:50:07 -05:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
|
|
|
|
2022-04-09 23:27:16 -05:00
|
|
|
use libwasm::{driver::DriverExitCode, get_input};
|
2022-04-09 16:50:07 -05:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
fn start() -> i32 {
|
|
|
|
let rand;
|
2022-04-09 23:27:16 -05:00
|
|
|
let ret;
|
2022-04-09 16:50:07 -05:00
|
|
|
unsafe {
|
|
|
|
send_signal(PID(1), Signals::Quit);
|
|
|
|
rand = get_random();
|
2022-04-09 23:27:16 -05:00
|
|
|
ret = get_input();
|
2022-04-09 16:50:07 -05:00
|
|
|
}
|
|
|
|
|
2022-04-09 23:27:16 -05:00
|
|
|
// rand as i32
|
|
|
|
|
|
|
|
ret as i32
|
2022-04-09 16:50:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
fn driver_entry() {}
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
fn driver_exit() -> DriverExitCode {
|
|
|
|
DriverExitCode::Success
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
libwasm::get_random,
|
|
|
|
libwasm::process::{signals::Signals, PID},
|
|
|
|
libwasm::syscalls::send_signal,
|
|
|
|
};
|
|
|
|
|
|
|
|
mod panic;
|