summaryrefslogtreecommitdiff
path: root/crates/types/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/types/src')
-rw-r--r--crates/types/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs
index ad82bd4..4895418 100644
--- a/crates/types/src/lib.rs
+++ b/crates/types/src/lib.rs
@@ -245,6 +245,12 @@ pub enum ValType {
ExternRef,
}
+impl ValType {
+ pub fn default_value(&self) -> WasmValue {
+ WasmValue::default_for(*self)
+ }
+}
+
/// A WebAssembly External Kind.
///
/// See <https://webassembly.github.io/spec/core/syntax/types.html#external-types>