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

Interface for .NET languages #156

Open
2 of 5 tasks
burkenyo opened this issue Jul 17, 2022 · 2 comments
Open
2 of 5 tasks

Interface for .NET languages #156

burkenyo opened this issue Jul 17, 2022 · 2 comments
Labels
work-in-progress An enhancement that someone is currently working on

Comments

@burkenyo
Copy link

burkenyo commented Jul 17, 2022

Abstract

An interface will be created to provide access to Cantera through programming languages in the .NET ecosystem. The interface will be available as a Nuget package, allowing users to integrate Cantera directly into their project using familiar paradigms.

Motivation

With the turn towards open-source and cross-platform that begun with .NET Core, coupled with crucial investments in the runtime and libraries to allow high-performance code, there is increasing interest in the community in using .NET for scientific computing.

In addition, there is a desire to extend Cantera to other languages such as Julia, using the C-interface for interop with the native Cantera library. The work on the .NET interface will take a first pass at implementing a source generator to scaffold code from the C-interface, as decscribed in #39.

Description

[TBD]

The initial version will support .NET Standard 2.0 (with the addition of nullable reference type attributes and memory types provided by Nuget packages) and .NET 6. This means the APIs not present in .NET Standard 2.0 (or provided by those two Nuget packages) will not be used.
String comparison in the C# layer will be performed with StringComparer.OrdinalIgnoreCase or StringComparison.OrdinalIgnoreCase

Tasks

  • Initial commit with an example
  • Hook build system up to scons
  • Integrate with CI

More tasks TBD re: mapping more and more functionality from CLib

  • Develop Nuget packaging strategy for core library
  • Develop Nuget packaging strategy for examples

TBD: develop Conda packaging strategy?

References

https://github.com/burkenyo/cantera/tree/dotnet-interface

@burkenyo burkenyo added the work-in-progress An enhancement that someone is currently working on label Jul 17, 2022
@burkenyo
Copy link
Author

Hi, I’ve created this stub issue so that I have the number. I will flush it out soon.

@ischoegl
Copy link
Member

ischoegl commented Aug 28, 2022

One interesting factoid I just found (while trying to debug CMake for Cantera's standard C++ samples, where it generates .sln and .vcxproj files, among others) is that C# projects are supported by CMake as well (see SO discussion). (PS: since support may be limited to Windows, it may not be that interesting after all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress An enhancement that someone is currently working on
Projects
None yet
Development

No branches or pull requests

2 participants