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

Generate C# bindings via code generation based on the core F# API #424

Open
kMutagene opened this issue Sep 23, 2023 · 0 comments
Open

Generate C# bindings via code generation based on the core F# API #424

kMutagene opened this issue Sep 23, 2023 · 0 comments
Labels
Area: CSharp Difficulty: Advanced Hackathon projects with advanced difficulty FeatureRequest FsLab Hackathon 2023 Implementation projects for the 2023 FsLab Hackathon Status: Available

Comments

@kMutagene
Copy link
Collaborator

kMutagene commented Sep 23, 2023

Description

We basically have 2 options here:

(1) Reflection-based F# code generation project

A WIP of this approach can be found on the csharp-object-bindings branch, which is severely out of date, so it might be best to just initialize a new project in the current repo and copy the files over.

The gist is that a well-defined string template for csharp source files is populated based on reflection-based runtime inspection of the F# types, functions and methods.

(2) C# incremental/source generators

here I have no domain knowledge at all, and all tutorials look like pure arcane glyphs to me. I think source generators are now called incremental generators. I think they are aiming to do what we need. I have absolutely no idea how to do this though. If we go this way, we need an experienced C# dev on it.

https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CSharp Difficulty: Advanced Hackathon projects with advanced difficulty FeatureRequest FsLab Hackathon 2023 Implementation projects for the 2023 FsLab Hackathon Status: Available
Projects
None yet
Development

No branches or pull requests

1 participant