Skip to content

Conversation

@Oliver-Quail
Copy link
Collaborator

Description

In this PR, I have added a code generator that works automatically with the api.json to generate the bindings for C#.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I have tested the output script with the current generation pipeline with no errors. I have then tested the output in SplashKit Online with C#

Testing Checklist

  • Tested in latest Firefox

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@stanjovani
Copy link

Hey oliver

Hey! Nice work on this — looks like you put a lot of effort into the struct generation and method mapping. The filtering logic makes sense, and it's cool to see how you're handling the SplashKit bindings. Great job 👍

@rabail-aamir
Copy link
Contributor

I tested the branch locally and the CSharpWasm project builds successfully without warnings.

I approve the PR :)
Screenshot 2025-12-07 at 1 14 15 am

Copy link

@Mdanial01 Mdanial01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this is a strong and well-focused pull request. Introducing a generator based on api.json to produce C# bindings is a solid improvement that will significantly reduce manual maintenance and improve long-term consistency.

Before merging, I recommend addressing a few points:

Please investigate and remove any hidden or bidirectional Unicode characters flagged by GitHub.

Since a generated file is committed, it would be good to document the generation process and ensure it is deterministic (ideally with a CI check to prevent drift).

The hard-coded path in CSharpCodeRunner.cs should be confirmed to be correct for all environments or made configurable to avoid future maintenance issues.

Once these points are addressed, this PR will be a valuable and maintainable addition to the project.

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

Successfully merging this pull request may close these issues.

4 participants