Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public void IncrementEpoch()
Native.wasmtime_engine_increment_epoch(handle);
}

/// <summary>
/// Returns whether this engine is using the Pulley interpreter to execute WebAssembly code.
/// </summary>
public bool IsPulleyInterpreter => Native.wasmtime_engine_is_pulley(NativeHandle);

internal Handle NativeHandle
{
get
Expand Down Expand Up @@ -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);

Expand All @@ -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);
Comment on lines +94 to +95
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I think this is missing an [return: MarshalAs(UnmanagedType.I1)] attribute. See: #171

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right, I'll fix that right away. Thanks

}

private readonly Handle handle;
Expand Down
Loading