feat: Implement MemoryUsage for Instance.

This commit is contained in:
Ivan Enderlin
2021-03-22 15:46:40 +01:00
parent 768adb9360
commit 906079fd9d
17 changed files with 65 additions and 20 deletions

View File

@@ -4,6 +4,7 @@ use crate::store::Store;
use crate::types::{Val, ValFuncRef};
use crate::RuntimeError;
use crate::TableType;
use loupe_derive::MemoryUsage;
use std::sync::Arc;
use wasmer_engine::{Export, ExportTable};
use wasmer_vm::{Table as RuntimeTable, VMCallerCheckedAnyfunc, VMExportTable};
@@ -17,7 +18,7 @@ use wasmer_vm::{Table as RuntimeTable, VMCallerCheckedAnyfunc, VMExportTable};
/// mutable from both host and WebAssembly.
///
/// Spec: <https://webassembly.github.io/spec/core/exec/runtime.html#table-instances>
#[derive(Clone)]
#[derive(Clone, MemoryUsage)]
pub struct Table {
store: Store,
table: Arc<dyn RuntimeTable>,