Skip to content

Win32 plugins via RPC #195

@JakubVanek

Description

@JakubVanek

Hi,

I want to propose a solution to the old problem of native plugins. I understand these aren't going to be supported for long, but as we've seen in #192 it is still possible to encounter routes using these plugins.

I think the only practical way of using native Win32 binaries on other platforms is through Wine. I propose implementing Win32 plugin server written in C/C++. It would run in Wine, wrapping the plugin into a RPC interface. For communication between Wine and Mono, we could use Apache Thrift or similar RPC. The same approach could then be adopted for native plugins on Windows.

The main tasks are:

  • Launching and maintaining a running standalone Wine instance.
    • We can either use Wine provided by the system, or we can download a self-contained package like PlayOnLinux does.
    • We can either use single server instance for all plugins (preferably), or we can spawn a new one for each plugin.
  • Reimplementing AtsPluginProxy to rely on RPC instead of on P/Invoke. It would connect to listening plugin server via TCP socket on localhost.
  • Implementing the RPC server using Win32 API and Thrift C++ API.

We can also avoid using existing RPC and implement our own, optimized protocol, as we precisely know which functions with which arguments can we call.

Best regards,

Jakub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions