wasmi_c_api/
frame.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
use crate::wasm_instance_t;
use alloc::boxed::Box;
use core::marker::PhantomData;

/// A Wasm frame object.
#[repr(C)]
#[derive(Clone)]
pub struct wasm_frame_t<'a> {
    _marker: PhantomData<fn() -> &'a ()>,
}

wasmi_c_api_macros::declare_own!(wasm_frame_t);

/// Returns the function index of the [`wasm_frame_t`].
///
/// # Note
///
/// This API is unsupported and will panic upon use.
#[no_mangle]
pub extern "C" fn wasm_frame_func_index(_frame: &wasm_frame_t<'_>) -> u32 {
    unimplemented!("wasm_frame_func_index")
}

/// Returns the function offset of the [`wasm_frame_t`].
///
/// # Note
///
/// This API is unsupported and will panic upon use.
#[no_mangle]
pub extern "C" fn wasm_frame_func_offset(_frame: &wasm_frame_t<'_>) -> usize {
    unimplemented!("wasm_frame_func_offset")
}

/// Returns the [`wasm_instance_t`] of the [`wasm_frame_t`].
///
/// # Note
///
/// This API is unsupported and will panic upon use.
#[no_mangle]
pub extern "C" fn wasm_frame_instance(_arg1: *const wasm_frame_t<'_>) -> *mut wasm_instance_t {
    unimplemented!("wasm_frame_instance")
}

/// Returns the module offset of the [`wasm_frame_t`].
///
/// # Note
///
/// This API is unsupported and will panic upon use.
#[no_mangle]
pub extern "C" fn wasm_frame_module_offset(_frame: &wasm_frame_t<'_>) -> usize {
    unimplemented!("wasm_frame_module_offset")
}

/// Returns a copy of the [`wasm_frame_t`].
///
/// # Note
///
/// This API is unsupported and will panic upon use.
#[no_mangle]
pub extern "C" fn wasm_frame_copy<'a>(_frame: &wasm_frame_t<'a>) -> Box<wasm_frame_t<'a>> {
    unimplemented!("wasm_frame_copy")
}