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
use crate::functions::FunctionSpec;
use crate::module_data::ModuleData;
use crate::tables::TableElement;
use crate::version_info::VersionInfo;
pub const LUCET_MODULE_SYM: &str = "lucet_module";
#[derive(Debug)]
pub struct Module<'a> {
pub version: VersionInfo,
pub module_data: ModuleData<'a>,
pub tables: &'a [&'a [TableElement]],
pub function_manifest: &'a [FunctionSpec],
}
#[repr(C)]
#[derive(Debug)]
pub struct SerializedModule {
pub version: VersionInfo,
pub module_data_ptr: u64,
pub module_data_len: u64,
pub tables_ptr: u64,
pub tables_len: u64,
pub function_manifest_ptr: u64,
pub function_manifest_len: u64,
}