36 lines
538 B
Rust
36 lines
538 B
Rust
#![no_std]
|
|
#![no_main]
|
|
|
|
use libwasm::{driver::DriverExitCode, get_input};
|
|
|
|
#[no_mangle]
|
|
fn start() -> i32 {
|
|
let rand;
|
|
let ret;
|
|
unsafe {
|
|
send_signal(PID(1), Signals::Quit);
|
|
rand = get_random();
|
|
ret = get_input();
|
|
}
|
|
|
|
// rand as i32
|
|
|
|
ret as i32
|
|
}
|
|
|
|
#[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;
|