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

Linux Support #46

Open
ksaunder opened this issue Aug 5, 2022 · 2 comments
Open

Linux Support #46

ksaunder opened this issue Aug 5, 2022 · 2 comments

Comments

@ksaunder
Copy link

ksaunder commented Aug 5, 2022

I am curious if there has been any attempt at getting a Linux compatible version? I have a fork of this repo where I am able to compile against netcoreapp3.1-windows just fine. However, since the Graphviz native libraries are windows specific I can't just use it on Linux. I am using the library from an Azure app service and it would be a lot cheaper if it could run on a Linux app service plan.

I spent a day diving into the C++ project to see what it might take to get a Linux version compiling. After that initial effort I thought it might be worth asking if you have already given this subject any thought and just haven't had time to do the work. If you do already have some ideas on the path forward here I would be willing to help progress Linux support if I can. As a disclaimer I am predominately a Windows C# developer myself, so I don't bring any significant C++ or Linux expertise, but this is an area of interest for me.

@chtenb
Copy link
Member

chtenb commented Aug 6, 2022

I haven't tried making this work on linux and I'm not aware of anyone else doing so.

To have the same experience on linux as we currently have on windows we would have to include the linux version of the graphviz binaries and have some msbuild logic in place which copies the right files based on the selected platform. I'm personally not familiar with .NET development on linux, so I can't give much advice on this front at the moment. I don't have much trust in msbuild making this easy though. I've spent too much time making sure native build dependencies are copied correctly transitively to referencing projects. The current version seems to sort of work, but it's hacky and has some quirks (see #36).

We'd also have to look into whether https://github.com/Rubjerg/Graphviz.NetWrapper/blob/master/Rubjerg.Graphviz/ForeignFunctionInterface.cs will just work on linux, or if this FFI needs a linux specific version because e.g. the dll imports may be different.

@chtenb
Copy link
Member

chtenb commented Aug 8, 2022

I've just added support for .netstandard2.0. This should make the transition to linux support easier.

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

No branches or pull requests

2 participants