Skip to content

Commit

Permalink
Version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfairh committed Sep 21, 2024
1 parent 5c47c77 commit be232a7
Show file tree
Hide file tree
Showing 459 changed files with 2,095 additions and 1,988 deletions.
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ build_tool_arguments:
- "-I${PWD}/sdk/public"
- "-Xlinker"
- "-lc++"
title: Steamworks v0.5.3
module_version: 0.5.3
title: Steamworks v1.0.0
module_version: 1.0.0
topic_style: source-order-defs
hide_coverage: true
undocumented_text: ""
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ A practical interface to the Steamworks SDK using the Swift C++ importer.

**Caveat Integrator: The Swift C++ importer is new and evolving; this package is built on top**

As of Swift 6, C++ finally seems solid on macOS. On Linux it's tough to recommend:
still tends to break in weird non-portable ways. I haven't tried Windows.

Current state:
* All Steamworks interfaces complete - see [API docs](https://johnfairh.github.io/steamworks-swift/index.html)
* Code gen creates Swift versions of Steam types; callbacks and call-returns work
Expand Down Expand Up @@ -264,7 +267,7 @@ let package = Package(
.macOS("14.0"),
],
dependencies: [
.package(url: "https://github.com/johnfairh/steamworks-swift", from: "0.5.2"),
.package(url: "https://github.com/johnfairh/steamworks-swift", from: "1.0.0"),
],
targets: [
.executableTarget(
Expand Down
6 changes: 3 additions & 3 deletions docs/api-clients.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>API Clients - Steamworks v0.5.3</title>
<title>API Clients - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="api-clients.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down Expand Up @@ -4616,7 +4616,7 @@ <h5>Declaration</h5>
</span>


<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/SteamAPI.swift#L24-L128">Show on GitHub</a></span>
<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/SteamAPI.swift#L28-L132">Show on GitHub</a></span>

</nav>
</div>
Expand Down
16 changes: 8 additions & 8 deletions docs/common-types.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>Common Types - Steamworks v0.5.3</title>
<title>Common Types - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="common-types.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down Expand Up @@ -5158,7 +5158,7 @@ <h5>Declaration</h5>
<nav class="j2-item-nav" aria-label="item details">


<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/ManualTypes.swift#L696">Show on GitHub</a></span>
<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/ManualTypes.swift#L656">Show on GitHub</a></span>

</nav>
</div>
Expand Down Expand Up @@ -7261,12 +7261,12 @@ <h5>Declaration</h5>


<section id="steamipaddress" class="j2-item j2-swift j2-always">
<a name="//apple_ref/cpp/Class/class%20SteamIPAddress" class="dashAnchor j2-item-dash-anchor" data-item-id="steamipaddress"></a>
<h4 class="visually-hidden">class SteamIPAddress</h4>
<a name="//apple_ref/cpp/Struct/struct%20SteamIPAddress" class="dashAnchor j2-item-dash-anchor" data-item-id="steamipaddress"></a>
<h4 class="visually-hidden">struct SteamIPAddress</h4>


<a class="j2-item-title" href="#_steamipaddress" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="_steamipaddress"><code>
<span class="j2-swift j2-always"><span class="j2-item-secondary">class </span>SteamIPAddress</span>
<span class="j2-swift j2-always"><span class="j2-item-secondary">struct </span>SteamIPAddress</span>

</code></a>
<div class="collapse j2-item-popopen-wrapper" id="_steamipaddress">
Expand All @@ -7293,7 +7293,7 @@ <h5>Declaration</h5>

<div class="j2-swift j2-always">
<div class="j2-callout-title" role="heading" aria-level="6">Swift</div>
<pre><code class="language-swift">public final class SteamIPAddress
<pre><code class="language-swift">public struct SteamIPAddress

extension SteamIPAddress: <a href="https://developer.apple.com/documentation/swift/sendable?language=swift">Sendable</a>, <a href="https://developer.apple.com/documentation/swift/hashable?language=swift">Hashable</a></code></pre>
</div>
Expand All @@ -7317,7 +7317,7 @@ <h5>Declaration</h5>
</span>


<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/ManualTypes.swift#L32-L90">Show on GitHub</a></span>
<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/ManualTypes.swift#L29-L87">Show on GitHub</a></span>

</nav>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>Constants - Steamworks v0.5.3</title>
<title>Constants - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="constants.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
42 changes: 25 additions & 17 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>Steamworks v0.5.3</title>
<title>Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="index.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down Expand Up @@ -4461,7 +4461,9 @@ <h1 class="j2-anchor j2-heading heading" id="steamworksswift">
steamworks-swift
</span></h1>
<p>A practical interface to the Steamworks SDK using the Swift C++ importer.</p>
<p><strong>Caveat Integrator: The Swift C++ importer is new and shaky; this package is built on top</strong></p>
<p><strong>Caveat Integrator: The Swift C++ importer is new and evolving; this package is built on top</strong></p>
<p>As of Swift 6, C++ finally seems solid on macOS. On Linux it’s tough to recommend:
still tends to break in weird non-portable ways. I haven’t tried Windows.</p>
<p>Current state:</p>
<ul>
<li>All Steamworks interfaces complete - see <a href="https://johnfairh.github.io/steamworks-swift/index.html">API docs</a></li>
Expand All @@ -4474,7 +4476,7 @@ <h1 class="j2-anchor j2-heading heading" id="steamworksswift">
<code>SteamworksConcurrency</code> module</li>
<li>Encrypted app ticket support in separate <code>SteamworksEncryptedAppTicket</code> module</li>
<li>Separate demo showing encrypted app-ticket stuff, <code>make run_ticket</code></li>
<li>Requires Swift 6, Xcode 16 beta – Linux not building right now, wait for 6 GA</li>
<li>Requires Swift 6 / Xcode 16</li>
<li>The Xcode project basically works.</li>
<li><del>Unit tests sometimes crash inside steam on exit</del> fixed!</li>
</ul>
Expand Down Expand Up @@ -4721,7 +4723,7 @@ <h2 class="j2-anchor j2-heading heading" id="how-to-use-this-project">
.macOS(&quot;14.0&quot;),
],
dependencies: [
.package(url: &quot;https://github.com/johnfairh/steamworks-swift&quot;, from: &quot;0.5.2&quot;),
.package(url: &quot;https://github.com/johnfairh/steamworks-swift&quot;, from: &quot;1.0.0&quot;),
],
targets: [
.executableTarget(
Expand Down Expand Up @@ -4761,31 +4763,37 @@ <h3 class="j2-anchor j2-heading heading" id="swift-c-bugs">
<span data-anchor-id="swift-c-bugs">
Swift C++ Bugs
</span></h3>
<p><em>to recheck in Swift 6, noticed 5.10 has fewer simd screw-ups at least</em></p>
<p>Tech limitations, on 5.9 Xcode 15.b6:</p>
<p>Mostly fixed in Swift 6. Linux still suffering a bit.</p>
<p>Tech limitations, on 6.0 Xcode 16.b3:</p>
<ul>
<li>Some structures/classes aren’t imported – is the common factor a <code>protected</code>
destructor? Verify by trying to use <code>SteamNetworkingMessage_t</code>.</li>
<li>Something goes wrong storing pointers to classes and they get nobbled by something.
<li><del>Something goes wrong storing pointers to classes and they get nobbled by something.
Verify by making <a href="steamworks/types/steamipaddress.html?swift"><code>SteamIPAddress</code></a> a struct and running <code>TestApiServer</code>. Or change
interfaces to cache the interface pointers.</li>
<li>Calls to virtual functions aren’t generated properly: Swift generates a ref
interfaces to cache the interface pointers.</del> incredibly, fixed in Swift 6</li>
<li><del>Calls to virtual functions aren’t generated properly: Swift generates a ref
to a symbol instead of doing the vtable call. So the actual C++ interfaces are not
usable in practice. Will use the flat API.</li>
usable in practice. Will use the flat API.</del> allegedly fixed in Swift 6 but don’t
need due to history.</li>
<li>Anonymous enums are not imported at all. Affects callback etc. ID constants.
Will work around.</li>
<li><del>sourcekit won’t give me a module interface for <code>CSteamworks</code> to see what else the
importer is doing. Probably Xcode’s fault, still not passing the user’s flags to
sourcekit and still doing insultingly bad error-reporting.</del> fixed in Xcode 15?!</li>
<li>Linux only: random parts of Glibc silently fail to import. SMH. Work around in C++.</li>
<li><del>Linux only: random parts of Glibc silently fail to import. SMH. Work around in C++.
See <code>swift_shims.h</code>.</del> Fixed in 6.0 (“for now”)</li>
<li><del>Linux only: implicit struct constructors are not created, Swift generates a ref
to a non-existent method that fails at link time. Work around with dumb C++
allocate shim.</del> Sort of fixed in 5.9, but instead <code>swiftc</code> crashes on some uses – on
both macOS and Linux. Check by refs to eg. <code>CSteamNetworkingIPAddr_Allocate()</code>.`</li>
allocate shim.</del> <del>Sort of fixed in 5.9, but instead <code>swiftc</code> crashes on some uses – on
both macOS and Linux. Check by refs to eg. <code>CSteamNetworkingIPAddr_Allocate()</code>, see
<code>steam_missing.h</code>.</del> Fixed in 6.0.</li>
<li>Linux only, <em>again</em>: SPM test auto-discovery has no clue about C++ interop. Work around by
smashing in the flag everywhere…</li>
<li>Swift 5.8+ adopts a broken/paranoid model about ‘projected pointers’ requiring some fairly
ugly code to work around. Verify with the <code>__ unsafe</code> stuff in <code>ManualTypes.swift</code>.</li>
smashing in the flag everywhere… Swift 6 - worse now, utterly broken on Linux with
yams 3rd-party dependency. Maybe fixable with swift-testing - for now nobbled those tests
on Linux. Yay?</li>
<li><del>Swift 5.8+ adopts a broken/paranoid model about ‘projected pointers’ requiring some fairly
ugly code to work around. Verify with the <code>__ unsafe</code> stuff in <code>ManualTypes.swift</code>.</del>
fixed by Swift 6ish</li>
</ul>
<h3 class="j2-anchor j2-heading heading" id="nonswift-problems">
<span data-anchor-id="nonswift-problems">
Expand Down
4 changes: 2 additions & 2 deletions docs/steamapps.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamApps - Steamworks v0.5.3</title>
<title>SteamApps - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamapps.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/steamfriends.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamFriends - Steamworks v0.5.3</title>
<title>SteamFriends - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamfriends.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/steamgamesearch.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamGameSearch - Steamworks v0.5.3</title>
<title>SteamGameSearch - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamgamesearch.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/steamgameserver.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamGameServer - Steamworks v0.5.3</title>
<title>SteamGameServer - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamgameserver.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/steamgameserverstats.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamGameServerStats - Steamworks v0.5.3</title>
<title>SteamGameServerStats - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamgameserverstats.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/steamhtmlsurface.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamHTMLSurface - Steamworks v0.5.3</title>
<title>SteamHTMLSurface - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamhtmlsurface.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/steamhttp.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamHTTP - Steamworks v0.5.3</title>
<title>SteamHTTP - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steamhttp.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down
6 changes: 3 additions & 3 deletions docs/steaminput.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="css/fw2020.css">


<title>SteamInput - Steamworks v0.5.3</title>
<title>SteamInput - Steamworks v1.0.0</title>

</head>
<body class="j2-swift " data-root-path="./" data-doc-path="steaminput.html" data-assets-path="">
Expand All @@ -31,7 +31,7 @@

<a href="index.html">

Steamworks v0.5.3</a>
Steamworks v1.0.0</a>
</div>


Expand Down Expand Up @@ -5987,7 +5987,7 @@ <h5>Declaration</h5>
</span>


<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/ManualTypes.swift#L132-L160">Show on GitHub</a></span>
<span class="j2-item-nav-item"><a href="https://github.com/johnfairh/swift-steamworks/blob/main/Sources/Steamworks/ManualTypes.swift#L129-L157">Show on GitHub</a></span>

</nav>
</div>
Expand Down
Loading

0 comments on commit be232a7

Please sign in to comment.