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

@@ -16,6 +16,7 @@ pub use self::table::Table;
use crate::exports::{ExportError, Exportable};
use crate::store::{Store, StoreObject};
use crate::ExternType;
use loupe_derive::MemoryUsage;
use std::fmt;
use wasmer_engine::Export;
@@ -23,7 +24,7 @@ use wasmer_engine::Export;
/// can be imported or exported.
///
/// Spec: <https://webassembly.github.io/spec/core/exec/runtime.html#external-values>
#[derive(Clone)]
#[derive(Clone, MemoryUsage)]
pub enum Extern {
/// A external [`Function`].
Function(Function),