Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-platform support #3

Open
forderud opened this issue Jan 8, 2016 · 4 comments
Open

Cross-platform support #3

forderud opened this issue Jan 8, 2016 · 4 comments
Milestone

Comments

@forderud
Copy link
Member

forderud commented Jan 8, 2016

Image3dAPI is currently Windows-only. This might become a problem.

TASK:

  • Investigate API alternatives to COM for non-Windows platforms.

DESIRED PROPERTIES:

  • C++ interface headers generated based on IDL files.
  • Compiler-independent binary interface (ABI).
  • Ability to run transparently either in-process (for performance) or out-of-process (for segregation/sandboxing).
  • Support transfer of image data ownership across API (to avoid copying).
@forderud
Copy link
Member Author

forderud commented Jan 29, 2018

Possible solution: https://github.com/forderud/public/tree/master/nonwin-com . It satisfies all the desired properties, except for out-of-process marshaling.

@forderud forderud changed the title Investigate cross-platform alternatives Cross-platform support Feb 6, 2018
forderud pushed a commit that referenced this issue Feb 23, 2018
@TheHubbit
Copy link
Contributor

Hi Fredrik, everyone,
I'm also concerned about (unhappy with?) the Windows only COM based interface. I'd prefer using a C style interface with primitive types that can be loaded (in-process) dynamically. The reason for this is that it seems to have the most universal support among platforms and languages (e.g. .NET PInvoke, Python ctypes). What do you think? Any general concerns before starting to look into it?

Best,
Thomas

@forderud
Copy link
Member Author

@TheHubbit If you take a look at the TestPython and TestViewer sample projects, then you'll see that Image3dAPI already support interoperability against .NET and Python. This works out-of-the-box, without the need for maintaining any language wrappers.

Some nice properties when accessing COM interfaces from "managed" languages like .NET and Pyton:

  • COM interfaces & datastructures appear like regular types in .NET & Python.
  • HRESULT error-codes are automatically translated to exceptions.
  • [retval] method arguments are automatically translated to return-values.

@TheHubbit
Copy link
Contributor

Thanks for getting back and pointing to the TestPython and TestViewer examples! I looked at the example and agree with the benefits of COM you’ve highlighted. The reason I brought up C style interfaces was in the context of cross platform support, namely not being restricted to Windows operating system.

@forderud forderud added this to the 3.x milestone Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants