Skip to content

Add direct C# Environment API - #44

Draft
deltathedumb wants to merge 12 commits into
mainfrom
develop/csharp-direct-environment
Draft

Add direct C# Environment API#44
deltathedumb wants to merge 12 commits into
mainfrom
develop/csharp-direct-environment

Conversation

@deltathedumb

Copy link
Copy Markdown
Owner

Adds a first-class managed-host ABI directly to portapy.dll and a safe C# wrapper.

Supported call shape:

using var env = new PortaPy.Environment();
env.Add(helloWorld);
env.Execute("helloWorld()");

The DLL owns runtime creation, callback IDs, global injection, UTF-16 conversion, dispatch, and cleanup. The C# wrapper roots delegates and propagates managed callback exceptions safely.

Validation includes Linux/Windows C ABI hosts and a Windows .NET 8 smoke test running the exact managed flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant