wasmer_vm/libcalls/eh/
mod.rs1mod dwarf;
4
5cfg_if::cfg_if! {
6 if #[cfg(any(target_env = "msvc", target_family = "wasm"))] {
7 #[repr(C)]
9 pub struct UwExceptionWrapper {
10 pub _uwe: (),
11 pub cause: Box<dyn std::any::Any + Send>,
12 }
13
14 impl UwExceptionWrapper {
15 pub fn new(tag: u64, data_ptr: usize, data_size: u64) -> Self {
16 Self {
17 _uwe: (),
18 cause: Box::new(WasmerException {
19 tag,
20 data_ptr,
21 data_size,
22 }),
23 }
24 }
25 }
26
27 #[repr(C)]
28 #[derive(Debug, thiserror::Error, Clone)]
29 #[error("Uncaught exception in wasm code!")]
30 pub struct WasmerException {
31 pub tag: u64,
32 pub data_ptr: usize,
33 pub data_size: u64,
34 }
35
36 pub fn wasmer_eh_personality() {
37 panic!()
38 }
39
40 pub fn throw(tag: u64, data_ptr: usize, data_size: u64) -> ! {
41 panic!()
42 }
43
44 pub fn rethrow(exc: *mut UwExceptionWrapper) -> ! {
45 panic!()
46 }
47
48
49 } else if #[cfg(any(
50 all(target_family = "windows", target_env = "gnu"),
51 target_family = "unix",
52 ))] {
53 mod gcc;
55 pub use gcc::*;
56 } else {
57 }
65}