Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
c0c4e35
Import steamworksparser.py
rlabrecque Jun 25, 2015
1282ca5
Added support for unnamed enums (enum constants)
rlabrecque Jun 26, 2015
6a1ee87
Added .gitignore for *.pyc files
rlabrecque Jun 26, 2015
ac61d19
The GameServer APIContext now has a UGC accessor
rlabrecque Aug 4, 2015
375419a
Fixed typedef.filename always being blank
rlabrecque Aug 29, 2015
d70b656
Enable recursive parsing for multiple /**/ comment blocks on one line
rlabrecque Oct 20, 2015
4b47e62
Skip _STEAM_CALLBACK_ Macros
rlabrecque Oct 21, 2015
7058416
Added README
rlabrecque Jan 4, 2016
a1aa3fc
Added MIT license
rlabrecque Jan 4, 2016
04e1053
ArgAttribute improvements
rlabrecque Feb 14, 2016
64a8694
Added parsing FunctionAttributes
rlabrecque Feb 14, 2016
607f2d2
Parse STEAM_PRIVATE_API()
rlabrecque Feb 14, 2016
ed2714c
Skip parsing #pragma and #undef
rlabrecque Jun 5, 2016
d440901
Allow setting ArgAttribute upon creation
rlabrecque Jun 5, 2016
bad3b10
Fixed loading CP-1252 files on linux...
rlabrecque Sep 7, 2016
10ad883
Added typedefs to comments and made typedefs exist per file.
rlabrecque Mar 11, 2017
4750a2d
Updated GameServerInterfaces
rlabrecque Aug 14, 2017
1371f0b
Updated for Steamworks 1.42
rlabrecque Jan 7, 2018
0103d47
Updated for Steamworks 1.43
rlabrecque Mar 3, 2019
c3dbdb8
Update for 1.44, skipping SteamNetworkingSockets for now
rlabrecque Aug 25, 2019
006f8e5
Fix attribute value parsing
rlabrecque Sep 8, 2019
c53c863
Ignore steamnetworkingsockets.h
rlabrecque Dec 6, 2019
86d4a41
Update for Steamworks SDK 1.48
rlabrecque Feb 23, 2020
e728bbd
Add some support for steamnetworkingtypes.h
rlabrecque Apr 5, 2020
4c196e1
Add support for isteamnetworkingutils.h
rlabrecque Apr 6, 2020
a70afd9
Add support for steamnetworkingsockets.h and steamdatagram_tickets.h
rlabrecque Apr 11, 2020
9c9c6d3
Add game server versions of isteamnetworkingutils and isteamnetworkin…
rlabrecque Apr 11, 2020
9db207d
Stop parsing isteamcontroller.h
rlabrecque Mar 20, 2021
596ce6d
Update README and LICENSE
rlabrecque Mar 20, 2021
948f95f
Correctly parse inline function definitions inside interfaces
rlabrecque Mar 21, 2021
59e460e
Update for Steamworks SDK 1.52
rlabrecque Oct 8, 2021
2701052
Update for Steamworks SDK 1.52 - sort-of handle non-callback enum con…
rlabrecque Dec 13, 2021
3f97c62
Update for Steamworks SDK 1.55 - skip isteamdualsense.h
rlabrecque Nov 21, 2022
d1556c6
Add support for the new STEAM_CALLBACK_MEMBER_ARRAY macro
TwoPoint-AndyChappell May 16, 2023
a7d2cc8
Handle the static const int value within GetTicketForWebApiResponse_t
TwoPoint-AndyChappell May 16, 2023
6f70e9c
Add SteamNetworkingMessages as a GameServer Interface
rlabrecque Jul 5, 2024
9b6bb11
Add Any CPU support, inspired by @Chicken-Bones
Akarinnnnn Aug 18, 2025
2f1c2e2
Merge remote-tracking branch 'origin/master' into anycpu-2
Akarinnnnn Aug 18, 2025
4f9526c
Imporve Any CPU compatibility
Akarinnnnn Aug 19, 2025
a1a7e88
Pack steam natives we building against into AnyCPU package
Akarinnnnn Sep 3, 2025
4795f76
Fix anycpu hook coverage and a typo.
Akarinnnnn Sep 20, 2025
e14303f
Changed when to check steam native requester. Fix indentation.
Akarinnnnn Oct 1, 2025
68e72a4
Explain why not check platform at initialization stage.
Akarinnnnn Oct 1, 2025
b3fbffb
Fix most callback system related marshal issues.
Akarinnnnn Oct 2, 2025
f774554
Handle UTF-8 encoded headers better
Akarinnnnn Oct 15, 2025
6094d28
Try add struct layout analysis, add type annotations
Akarinnnnn Oct 16, 2025
ae64db4
Attempt to make parser smarter
Akarinnnnn Oct 17, 2025
838227c
Attempt to calculate total size of structs, part 3
Akarinnnnn Oct 17, 2025
ecedecc
Attempt to calculate total size of structs, part 4
Akarinnnnn Oct 17, 2025
b886410
Attempt to calculate total size of structs, attempt 5
Akarinnnnn Oct 17, 2025
665fb11
[Feature] Implement struct field offset analysis.
Akarinnnnn Oct 17, 2025
cffcf04
Preparing use subtree instead of submodule
Akarinnnnn Oct 18, 2025
d1c5334
Add 'CodeGen/SteamworksParser/' from commit '665fb115a9182883457a6bb5…
Akarinnnnn Oct 18, 2025
9409625
Make struct layout analysis work
Akarinnnnn Oct 18, 2025
463c103
Add support to hack marshalling on demand
Akarinnnnn Oct 18, 2025
58d170e
Hide const packsize, expose it by static readonly field instead
Akarinnnnn Oct 18, 2025
118c264
Allow generator to ignore structs, clearify ambiguous type of `Field.…
Akarinnnnn Oct 18, 2025
21ab2c9
Source geneator now generate both native function variant for packsiz…
Akarinnnnn Oct 18, 2025
7656460
Source generator now generate both variant of packsize aware struct.
Akarinnnnn Oct 18, 2025
720e3e9
Generated code not work, need fix.
Akarinnnnn Oct 18, 2025
b05bb82
Fixed constant value confliction by ignore a problemtic file.
Akarinnnnn Oct 18, 2025
245f934
Fix steam headers parser for ignoring `SteamParamStringArray_t::m_ppS…
Akarinnnnn Oct 18, 2025
43f1cee
Fix `Callback<T>` doesn't marshal Any CPU correctly.
Akarinnnnn Oct 18, 2025
a9a9c94
Make SrcGen can generate Any CPU interface wrapper.
Akarinnnnn Oct 23, 2025
7e3f73b
Fixed pack-size aware typed parameter array generation.
Akarinnnnn Oct 26, 2025
45735fa
Regenerate native imports with array fix.
Akarinnnnn Oct 26, 2025
db34fd9
Merge remote-tracking branch 'origin/master' into anycpu-packable-fix…
Akarinnnnn Oct 26, 2025
144b998
Fix gameserver interfaces generation
Akarinnnnn Oct 26, 2025
a2b4d15
All Steam interface wrappers seems work.
Akarinnnnn Oct 27, 2025
c3e001b
Regenerate steam interface wrappers.
Akarinnnnn Oct 27, 2025
205f2ce
Fix array parameter usage of packsize aware structs.
Akarinnnnn Oct 28, 2025
34f1c9b
add a github workflow to pack and push nuget package
ryan-linehan Oct 29, 2025
58372e6
update workflow to take inputs for version and publishing
ryan-linehan Oct 29, 2025
70d6595
update action name
ryan-linehan Oct 29, 2025
b4f588c
add tag versioning for publishing nuget package + add approver step f…
ryan-linehan Oct 30, 2025
9accc2c
default version to 0.0.0 so build can still run on push
ryan-linehan Oct 30, 2025
9dce2a3
remove branch trigger on push to + utilize proper variable syntax for…
ryan-linehan Oct 30, 2025
c0a00b5
Add workflow for packing and publishing steamworks Steamworks.NET.Any…
Akarinnnnn Oct 30, 2025
7837299
Merge remote-tracking branch 'upstream/master' into anycpu-packable-f…
Akarinnnnn Nov 1, 2025
f74fd46
Merge upstream changes.
Akarinnnnn Nov 1, 2025
a69c39c
include STEAMWORKS_WIN constant
ryan-linehan Nov 3, 2025
3f496ea
add a fix to dynamically load assembly on windows
ryan-linehan Nov 3, 2025
83b6901
Revert adding of macro `STEAMWORKS_WIN`
Akarinnnnn Nov 3, 2025
9537d42
Changed the time to hook dll loading.
Akarinnnnn Nov 3, 2025
041d48d
Move loader hook fix to source generator's template.
Akarinnnnn Nov 4, 2025
e32c435
Change the place of DLL resolve hook (#6)
Akarinnnnn Nov 4, 2025
584dfee
Fix anycpu large pack native function was leak.
Akarinnnnn Nov 4, 2025
f87d28f
Fix non-anycpu variant uses anycpu wrapper
Akarinnnnn Nov 4, 2025
4eef453
Regenreate to fix AnyCPU wrappers leak.
Akarinnnnn Nov 4, 2025
8b21508
update sendsignal to be pack aware with manual edits
ryan-linehan Nov 5, 2025
01d6df4
Move loader hook fix to source generator's template.
Akarinnnnn Nov 4, 2025
a1520ae
update structs.py to include SteamNetConnectionInfo_t as a sequential…
ryan-linehan Nov 5, 2025
0484eda
update send signal template to be pack size aware
ryan-linehan Nov 5, 2025
5db56bb
update nativemethods.txt to have pack aware dll import
ryan-linehan Nov 5, 2025
b93ba43
Fix packsize aware struct nested in pack aware struct.
Akarinnnnn Nov 5, 2025
6e89074
Create bug report template
Akarinnnnn Nov 15, 2025
924a234
Create bug report template (#11)
Akarinnnnn Nov 15, 2025
d1aea9d
SendSignal fixes without changing generated files (#9)
Akarinnnnn Nov 18, 2025
ce4f0d1
Show pack and size of structs by C++
Akarinnnnn Nov 19, 2025
b2f6812
Pull from latest contributions
Akarinnnnn Nov 19, 2025
02a0b05
Merge branch 'sendsignal_gen_fixes' into anycpu-packable-fix-align-by…
Akarinnnnn Nov 19, 2025
0cef5c3
Merge branch 'anycpu-packable-fix-align-by-conditionalmarshal' of htt…
Akarinnnnn Nov 19, 2025
e00131c
Merge branch 'anycpu-2' into anycpu-packable-fix-align-by-conditional…
Akarinnnnn Nov 20, 2025
b3c8e99
Commit parser to be merged to packable branch
Akarinnnnn Nov 20, 2025
eecc2f5
Merge branch 'sendsignal_gen_fixes' into anycpu-packable-fix-align-by…
Akarinnnnn Nov 20, 2025
c801a1f
Try to analyze structs like CGameID
Akarinnnnn Nov 24, 2025
6467bd2
Add an comparer to official generated data.
Akarinnnnn Nov 25, 2025
e3fdc5e
Revert class parsing and fixed array related field handling
Akarinnnnn Nov 29, 2025
a307b6f
Fix invalid escape sequence warnings by converting regex patterns to …
ropemonkey Nov 19, 2025
9c01d44
Simplify marshal fix review (#12)
Akarinnnnn Dec 27, 2025
10346f4
Merge branch 'anycpu-2' into anycpu-packable-fix-align-by-conditional…
Akarinnnnn Dec 27, 2025
e0a11ea
Add a advanced script to test parser's pack-awareness
Akarinnnnn Dec 27, 2025
bddb1b1
Regenerate after struct field scan algorithm update
Akarinnnnn Feb 3, 2026
c49991e
Merge branch 'anycpu-packable-fix-align-by-conditionalmarshal' of htt…
Akarinnnnn Feb 3, 2026
ea71f9e
Changed DllImportResolver hack to allow searching .so etc. in assembl…
Akarinnnnn Feb 18, 2026
dd32b50
Fixed old win64 steam native resolve logic
Akarinnnnn Feb 18, 2026
30b0ac9
Fix large pack structs weren't being used
Akarinnnnn Feb 20, 2026
288f658
Merge upstream SteamworksParser changes
Akarinnnnn Feb 21, 2026
9523093
Minor misc changes
Akarinnnnn Feb 22, 2026
671a180
Add missing "lib" prefix to native resolve logic
Akarinnnnn Feb 24, 2026
c2439a3
Fix Godot loading compatibility
Akarinnnnn Feb 25, 2026
6165318
Fix pack size related marshal issues.
Akarinnnnn Feb 25, 2026
89a6fc8
Bind to Steamworks SDK v1.63
Akarinnnnn Feb 26, 2026
24f96fe
Sync upstream with new target: Steamworks SDK v1.63 (#14)
Akarinnnnn Feb 26, 2026
b67c13c
ver 2025.163.1-a
Akarinnnnn Mar 1, 2026
bc04e33
NuGet package and metadata changes (#15)
Akarinnnnn Mar 1, 2026
06ac09e
Bump Steamworks SDK to v1.64
Akarinnnnn May 11, 2026
c857136
Upgrade Steamworks SDK to v1.64 (#17)
Akarinnnnn May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Standalone3.0/Steamworks.NET.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Steamworks</RootNamespace>
<RepositoryType>git</RepositoryType>
<DefineConstants>STEAMWORKS_LIN_OSX;STEAMWORKS_X64;STEAMWORKS_ANYCPU</DefineConstants>
</PropertyGroup>

<PropertyGroup Label="Nuget PM">
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<!-- Once Any CPU get merged, remove next line to restore package ID to Steamworks.NET. -->
<PackageId>Steamworks.NET.AnyCPU</PackageId>
<Authors>rlabrecque</Authors>
<!--
Version is specified by build commandline, -p:Version=2025.8.18
<PackageVersion>15.0.1</PackageVersion>
-->
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/rlabrecque/Steamworks.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/rlabrecque/Steamworks.NET.git</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<Compile Include="../com.rlabrecque.steamworks.net/Runtime/**/*.cs" LinkBase="src" />
</ItemGroup>
<ItemGroup>
<None Include="..\Standalone\README.md" Link="README-standalone.md" Pack="true" PackagePath="docs/README-standalone.md" />
<None Include="..\README.md" Link="README.md" Pack="true" PackagePath="README.md" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions Standalone3.0/Steamworks.NET.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steamworks.NET", "Steamworks.NET.csproj", "{F34F403D-1D4D-4DC6-BBAE-DA31190EC88C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F34F403D-1D4D-4DC6-BBAE-DA31190EC88C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F34F403D-1D4D-4DC6-BBAE-DA31190EC88C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F34F403D-1D4D-4DC6-BBAE-DA31190EC88C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F34F403D-1D4D-4DC6-BBAE-DA31190EC88C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EDFD04E1-5140-4A08-9F0B-3BE1A9B58AE6}
EndGlobalSection
EndGlobal
41 changes: 40 additions & 1 deletion com.rlabrecque.steamworks.net/Runtime/Steam.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is provided under The MIT License as part of Steamworks.NET.
// This file is provided under The MIT License as part of Steamworks.NET.
// Copyright (c) 2013-2022 Riley Labrecque
// Please see the included LICENSE.txt for additional information.

Expand Down Expand Up @@ -56,6 +56,9 @@ public static class SteamAPI {
// Returns true on success
public static ESteamAPIInitResult InitEx(out string OutSteamErrMsg)
{
#if STEAMWORKS_ANYCPU
BeAnyCPUCompatible();
Comment thread
Akarinnnnn marked this conversation as resolved.
Outdated
#endif
InteropHelp.TestIfPlatformSupported();

var pszInternalCheckInterfaceVersions = new System.Text.StringBuilder();
Expand Down Expand Up @@ -111,7 +114,43 @@ public static ESteamAPIInitResult InitEx(out string OutSteamErrMsg)
}
}

#if STEAMWORKS_ANYCPU // implies .net core and STEAMWORKS_X86
private static void BeAnyCPUCompatible() {
if (s_isAnyCPUHookApplied)
return;

s_isAnyCPUHookApplied = true;
System.Runtime.Loader.AssemblyLoadContext.Default.ResolvingUnmanagedDll += SteamNativeResolveHook;
}

private static bool s_isAnyCPUHookApplied = false;

private static nint SteamNativeResolveHook(System.Reflection.Assembly requestAsm, string name) {
// check who is requesting steam native. only do loading tricks when we requesting steam native
if (requestAsm.GetName().Name != "Steamworks.NET") {
return 0;
}

// check is requesting library name matches steam native
if ((name == NativeMethods.NativeLibraryName || name == NativeMethods.NativeLibrary_SDKEncryptedAppTicket)
// check are we on win64, the special case we are going to handle
&& RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && System.Environment.Is64BitProcess) {

// platform specific suffix is not needed
string x64LibName = $"{name}64";
// we don't care failed load, let next handler manage it
NativeLibrary.TryLoad(x64LibName, requestAsm, null, out nint lib);
return lib;
}

return 0;
}
#endif

public static bool Init() {
#if STEAMWORKS_ANYCPU
BeAnyCPUCompatible();
#endif
InteropHelp.TestIfPlatformSupported();

string SteamErrorMsg;
Expand Down