File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,20 @@ public Config WithCacheConfig(string? path)
343
343
return this ;
344
344
}
345
345
346
+ /// <summary>
347
+ /// Configures whether, when on macOS, Mach ports are used for exception handling
348
+ /// instead of traditional Unix-based signal handling.
349
+ ///
350
+ /// This option defaults to true, using Mach ports by default.
351
+ /// </summary>
352
+ /// <param name="enable">True to enable Mach ports or false to disable.</param>
353
+ /// <returns>Returns the current config.</returns>
354
+ public Config WithMacosMachPorts ( bool enable )
355
+ {
356
+ Native . wasmtime_config_macos_use_mach_ports ( handle , enable ) ;
357
+ return this ;
358
+ }
359
+
346
360
/// <inheritdoc/>
347
361
public void Dispose ( )
348
362
{
@@ -450,6 +464,9 @@ private static class Native
450
464
451
465
[ DllImport ( Engine . LibraryName ) ]
452
466
public static extern IntPtr wasmtime_config_cache_config_load ( Handle config , [ MarshalAs ( Extensions . LPUTF8Str ) ] string ? path ) ;
467
+
468
+ [ DllImport ( Engine . LibraryName ) ]
469
+ public static extern void wasmtime_config_macos_use_mach_ports ( Handle config , [ MarshalAs ( UnmanagedType . I1 ) ] bool enable ) ;
453
470
}
454
471
455
472
private readonly Handle handle ;
You can’t perform that action at this time.
0 commit comments