Skip to content

Conversation

@Akarinnnnn
Copy link
Owner

@Akarinnnnn Akarinnnnn commented Oct 2, 2025

Our goal is to fix most callback system related marshal issues.

Added a conditional marshalling table to decide which alignment to use at runtime, this should fix most callback-retrieve related issues.

Struct parameters in interface methods are still need to fix. Edit: Completed.

I think we still need some effort to fix parameters, maybe we still have to ship different assembly for different platforms.
Edit: Parameter marshal is done, through it looks ugly.

Now the only problem is to find out which struct we treat it specially, in generation process.

And sorted Skippedlines
@Chicken-Bones
Copy link
Collaborator

Unfortunately this has turned out more complex than I envisioned. I'm willing to take a look at the parser myself but finding time will take longer. My apologies for the delay.

@Akarinnnnn
Copy link
Owner Author

I have an idea about using C++ toolchain to find which one is really need to focus on. Since I have MSVC and WSL clang, why not?

@Akarinnnnn
Copy link
Owner Author

Akarinnnnn commented Nov 18, 2025

https://gist.github.com/Akarinnnnn/0a35bb1d250505aa98020138498cfbe4

Here is my result(in progress). Line format is "{name}\t{size}\t{pack}" . By analyzing with C++ compilers directly, I think we can get the most accurate pack and size to compare.

@Akarinnnnn
Copy link
Owner Author

Akarinnnnn commented Nov 24, 2025

Maybe it is too smart to my expectations for parser code. We just need to make it smart enough as git merge. I mean, some predefined special handling is enough just like old ways.

@Akarinnnnn
Copy link
Owner Author

Akarinnnnn commented Nov 29, 2025

Bad news here, I can't sync parser changes to my fork because git bugs. I did things below:
0. Clone this repo if you haven't, it called Steamworks.NET below.

  1. Prepare a bare repo storing my fork on your computer, steps below:
    a. git init --bare SteamworksParser.git
    b. git remote add origin https://github.com/Akarinnnnn/SteamworksParser.git
    c. git fetch origin
  2. Attempt to sync changes to there by git subtree push '--prefix=CodeGen/SteamworksParser' ..\SteamworksParser.git smart-anycpu-marshal on Steamworks.NET repo root,
  3. Stuck on progress 17/71 (213) [199].

Would you guys meet this problem? This is very important for reviewing parser code changes. If you don't, would you help us to sync? I would gain write access of my fork to you.

Additionally, my filesystem storing code is ReFS, working on NTFS might not meet this problem.

@Akarinnnnn
Copy link
Owner Author

@Chicken-Bones Incorrect marked pack aware structs should fixed a lot now. I've updated the gist to including the list.

@Akarinnnnn
Copy link
Owner Author

Bad news here, I can't sync parser changes to my fork because git bugs. I did things below:
Additionally, my filesystem storing code is ReFS, working on NTFS might not meet this problem.

@Chicken-Bones Resolved, I pushed to GitHub directly on a NTFS drive, though some error messages thrown, it works.

Akarinnnnn added a commit that referenced this pull request Dec 27, 2025
Simplify marshal fix #1 's review page, hide these `git subtree`
imported commits from by merge them into base branch `anycpu-2`.
@Akarinnnnn
Copy link
Owner Author

Reopen this, it's accidently closed by GitHub bots.

@Akarinnnnn
Copy link
Owner Author

Unfortunately this has turned out more complex than I envisioned. I'm willing to take a look at the parser myself but finding time will take longer. My apologies for the delay.

Do we accept every time Steamworks SDK updates we regenerate special struct table by C++ compiler? Or we just using this method to debug marshal bugs when it happens again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

6 participants