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

Improvements to struct interop for DOTS #70

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

limoka
Copy link
Contributor

@limoka limoka commented Jan 22, 2023

This PR includes three improvements, which make working with DOTS based games much easier:

  • Allow to inject custom structs into il2cpp runtime.
  • A fix to how methods with struct pointers are generated.
  • Allow Generic structs to be marked as blittable. This change could be breaking as some structs previously marked as classes now are structs. I'm performing checks if the struct is indeed blittable and making it's generic parameters constrained to unmanaged.

@limoka limoka marked this pull request as draft January 23, 2023 12:28
@limoka limoka marked this pull request as ready for review February 2, 2023 18:44
@limoka
Copy link
Contributor Author

limoka commented Feb 2, 2023

With the last commit, I think I fixed the generation issue Kasuromi found earlier. Now I added another kind of TypeSpecifics: GenericBlittableStruct, meaning blittability depends on used type arguments. For such structs I generate both boxed and unboxed versions, and switch them depending on the generic arguments.

@limoka limoka requested a review from js6pak May 23, 2023 08:46
mosamadeeb added a commit to mosamadeeb/MMXD-Mods that referenced this pull request Sep 11, 2023
@ds5678 ds5678 added enhancement New feature or request generation Related to assembly generation labels Jul 15, 2024
@ds5678
Copy link
Collaborator

ds5678 commented Sep 9, 2024

Hello! I am open to reviewing this pull request if you rebase it.

@limoka
Copy link
Contributor Author

limoka commented Sep 9, 2024

I can do that sometime later, however recently I'm rather busy with Core Keeper's 1.0 release.
On top of that I no longer have a test game. Core Keeper no longer uses il2cpp, and the only other game I know of that uses this PR is VRising.

@limoka
Copy link
Contributor Author

limoka commented Sep 9, 2024

Also if I had to guess there is a lot of changes that would be needed because of #124 for this to work properly.

@ds5678
Copy link
Collaborator

ds5678 commented Sep 9, 2024

Also if I had to guess there is a lot of changes that would be needed because of #124 for this to work properly.

That is correct. The switch to AsmResolver required many changes. In some ways, it was a rewrite of the generator.

@limoka
Copy link
Contributor Author

limoka commented Sep 9, 2024

Do you have any Cecil to AsmResolver migration guides perhaps? I'm not familiar with the latter.

@ds5678
Copy link
Collaborator

ds5678 commented Sep 9, 2024

They are very similar, though I don't have any guides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request generation Related to assembly generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants