Skip to content

Commit 98d0987

Browse files
authored
Added IsPulleyInterpreter property on Engine (#338)
1 parent a0c9bb5 commit 98d0987

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Engine.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public void IncrementEpoch()
4444
Native.wasmtime_engine_increment_epoch(handle);
4545
}
4646

47+
/// <summary>
48+
/// Returns whether this engine is using the Pulley interpreter to execute WebAssembly code.
49+
/// </summary>
50+
public bool IsPulleyInterpreter => Native.wasmtime_engine_is_pulley(NativeHandle);
51+
4752
internal Handle NativeHandle
4853
{
4954
get
@@ -76,7 +81,7 @@ private static class Native
7681
{
7782
[DllImport(LibraryName)]
7883
public static extern IntPtr wasm_engine_new();
79-
84+
8085
[DllImport(LibraryName)]
8186
public static extern IntPtr wasm_engine_new_with_config(Config.Handle config);
8287

@@ -85,6 +90,9 @@ private static class Native
8590

8691
[DllImport(LibraryName)]
8792
public static extern void wasmtime_engine_increment_epoch(Handle engine);
93+
94+
[DllImport(LibraryName)]
95+
public static extern bool wasmtime_engine_is_pulley(Handle engine);
8896
}
8997

9098
private readonly Handle handle;

0 commit comments

Comments
 (0)