Next Generation WASM Microkernel Operating System
at trap_handler 27 lines 816 B view raw
1// Copyright 2025 Jonas Kruckenberg 2// 3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or 4// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or 5// http://opensource.org/licenses/MIT>, at your option. This file may not be 6// copied, modified, or distributed except according to those terms. 7 8#![no_std] 9#![no_main] 10 11// (import "k23" "roundtrip_i64" (func $hostfunc (param i64) (result i64))) 12#[link(wasm_import_module = "k23")] 13extern "C" { 14 #[link_name = "roundtrip_i64"] 15 fn host_roundtrip_i64(params: i64) -> i64; 16} 17 18// (func (export "roundtrip_i64") (param $arg i64) (result i64) 19#[no_mangle] 20extern "C" fn roundtrip_i64(param: i64) -> i64 { 21 unsafe { host_roundtrip_i64(param) } 22} 23 24#[panic_handler] 25fn panic(_info: &core::panic::PanicInfo) -> ! { 26 loop {} 27}