Skip to content

Commit 5e5dd7a

Browse files
authored
allow setting the function definition size (#184)
Signed-off-by: Jorge Prendes <[email protected]>
1 parent ffd9155 commit 5e5dd7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/hyperlight_wasm/src/sandbox/sandbox_builder.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ impl SandboxBuilder {
104104
self
105105
}
106106

107+
/// Set the size of the memory buffer that is made available
108+
/// for serialising host function definitions the minimum value
109+
/// is MIN_FUNCTION_DEFINITION_SIZE
110+
pub fn with_function_definition_size(mut self, size: usize) -> Self {
111+
self.config.set_host_function_definition_size(size);
112+
self
113+
}
114+
107115
/// Get the current configuration
108116
pub fn get_config(&self) -> &SandboxConfiguration {
109117
&self.config

0 commit comments

Comments
 (0)