mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-31 23:32:04 +00:00
Add tests for metering, add option to compiler config
This commit is contained in:
@@ -59,6 +59,8 @@ pub struct CompilerConfig {
|
||||
pub symbol_map: Option<HashMap<u32, String>>,
|
||||
pub memory_bound_check_mode: MemoryBoundCheckMode,
|
||||
pub enforce_stack_check: bool,
|
||||
/// Enables metering functionality if set and used as default points limit during compilation
|
||||
pub points_limit: Option<u64>,
|
||||
}
|
||||
|
||||
pub trait Compiler {
|
||||
|
@@ -350,6 +350,16 @@ impl Ctx {
|
||||
pub fn dynamic_sigindice_count(&self) -> usize {
|
||||
unsafe { (*self.local_backing).dynamic_sigindices.len() }
|
||||
}
|
||||
|
||||
/// Returns the number of points used by a function call for metering
|
||||
pub fn get_points_used(&self) -> u64 {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Sets the value of points used
|
||||
pub fn set_points_used(&mut self, _value: u64) {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
Reference in New Issue
Block a user