wasmi_c_api/
frame.rs

1use crate::wasm_instance_t;
2use alloc::boxed::Box;
3use core::marker::PhantomData;
4
5/// A Wasm frame object.
6#[repr(C)]
7#[derive(Clone)]
8pub struct wasm_frame_t<'a> {
9    _marker: PhantomData<fn() -> &'a ()>,
10}
11
12wasmi_c_api_macros::declare_own!(wasm_frame_t);
13
14/// Returns the function index of the [`wasm_frame_t`].
15///
16/// # Note
17///
18/// This API is unsupported and will panic upon use.
19#[cfg_attr(not(feature = "prefix-symbols"), no_mangle)]
20#[cfg_attr(feature = "prefix-symbols", wasmi_c_api_macros::prefix_symbol)]
21pub extern "C" fn wasm_frame_func_index(_frame: &wasm_frame_t<'_>) -> u32 {
22    unimplemented!("wasm_frame_func_index")
23}
24
25/// Returns the function offset of the [`wasm_frame_t`].
26///
27/// # Note
28///
29/// This API is unsupported and will panic upon use.
30#[cfg_attr(not(feature = "prefix-symbols"), no_mangle)]
31#[cfg_attr(feature = "prefix-symbols", wasmi_c_api_macros::prefix_symbol)]
32pub extern "C" fn wasm_frame_func_offset(_frame: &wasm_frame_t<'_>) -> usize {
33    unimplemented!("wasm_frame_func_offset")
34}
35
36/// Returns the [`wasm_instance_t`] of the [`wasm_frame_t`].
37///
38/// # Note
39///
40/// This API is unsupported and will panic upon use.
41#[cfg_attr(not(feature = "prefix-symbols"), no_mangle)]
42#[cfg_attr(feature = "prefix-symbols", wasmi_c_api_macros::prefix_symbol)]
43pub extern "C" fn wasm_frame_instance(_arg1: *const wasm_frame_t<'_>) -> *mut wasm_instance_t {
44    unimplemented!("wasm_frame_instance")
45}
46
47/// Returns the module offset of the [`wasm_frame_t`].
48///
49/// # Note
50///
51/// This API is unsupported and will panic upon use.
52#[cfg_attr(not(feature = "prefix-symbols"), no_mangle)]
53#[cfg_attr(feature = "prefix-symbols", wasmi_c_api_macros::prefix_symbol)]
54pub extern "C" fn wasm_frame_module_offset(_frame: &wasm_frame_t<'_>) -> usize {
55    unimplemented!("wasm_frame_module_offset")
56}
57
58/// Returns a copy of the [`wasm_frame_t`].
59///
60/// # Note
61///
62/// This API is unsupported and will panic upon use.
63#[cfg_attr(not(feature = "prefix-symbols"), no_mangle)]
64#[cfg_attr(feature = "prefix-symbols", wasmi_c_api_macros::prefix_symbol)]
65pub extern "C" fn wasm_frame_copy<'a>(_frame: &wasm_frame_t<'a>) -> Box<wasm_frame_t<'a>> {
66    unimplemented!("wasm_frame_copy")
67}