mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 05:18:43 +00:00
Add SectionBody which holds the bytes of a section.
Wire it up to CompiledModule::new().
This commit is contained in:
@@ -64,7 +64,7 @@ pub use crate::function::{
|
||||
};
|
||||
pub use crate::jump_table::{JumpTable, JumpTableOffsets};
|
||||
pub use crate::relocation::{Relocation, RelocationKind, RelocationTarget, Relocations};
|
||||
pub use crate::section::{CustomSection, CustomSectionProtection, SectionIndex};
|
||||
pub use crate::section::{CustomSection, CustomSectionProtection, SectionBody, SectionIndex};
|
||||
pub use crate::sourceloc::SourceLoc;
|
||||
pub use crate::translator::{
|
||||
to_wasm_error, translate_module, FunctionBodyData, ModuleEnvironment, ModuleTranslation,
|
||||
|
||||
@@ -41,6 +41,9 @@ pub struct CustomSection {
|
||||
/// > (the start of the memory pointer).
|
||||
/// > We might need to create another field for alignment in case it's
|
||||
/// > needed in the future.
|
||||
#[serde(with = "serde_bytes")]
|
||||
pub bytes: Vec<u8>,
|
||||
pub bytes: SectionBody,
|
||||
}
|
||||
|
||||
/// The bytes in the section.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
pub struct SectionBody(#[serde(with = "serde_bytes")] Vec<u8>);
|
||||
|
||||
Reference in New Issue
Block a user