From f1d4812ccf3bcdfcf45d69e3ff28a76674758396 Mon Sep 17 00:00:00 2001 From: Martin Evans Date: Mon, 14 Jul 2025 00:54:07 +0100 Subject: [PATCH] Added `IsPulleyInterpreter` property on `Engine` --- src/Engine.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Engine.cs b/src/Engine.cs index eb1ce7d8..732e5db7 100644 --- a/src/Engine.cs +++ b/src/Engine.cs @@ -44,6 +44,11 @@ public void IncrementEpoch() Native.wasmtime_engine_increment_epoch(handle); } + /// + /// Returns whether this engine is using the Pulley interpreter to execute WebAssembly code. + /// + public bool IsPulleyInterpreter => Native.wasmtime_engine_is_pulley(NativeHandle); + internal Handle NativeHandle { get @@ -76,7 +81,7 @@ private static class Native { [DllImport(LibraryName)] public static extern IntPtr wasm_engine_new(); - + [DllImport(LibraryName)] public static extern IntPtr wasm_engine_new_with_config(Config.Handle config); @@ -85,6 +90,9 @@ private static class Native [DllImport(LibraryName)] public static extern void wasmtime_engine_increment_epoch(Handle engine); + + [DllImport(LibraryName)] + public static extern bool wasmtime_engine_is_pulley(Handle engine); } private readonly Handle handle;