feat(macOS): Restore macOS support - #841
Open
iFleey wants to merge 11 commits into
Open
Conversation
Thanks to user @zadowcloud for the feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey again! The macOS support from #664 shipped in v3.0.0, but it quietly rotted on
main. With no macOS CI to catch it, the async-ffi / sdk-flatten / pipe-CDP refactors reintroduced a handful of Linux-isms and left the CDP transport a#elsestub — so onmaintoday it doesn't build, and even patched locally the menus won't open. This PR gets it green again.Roughly whats in here:
Build drift
a few Linux-only assumptions (endian headers, inotify,
SOCK_CLOEXEC, a Rust return type) crept back in without__APPLE__branches. Restored them.CDP transport
this was the real "menus won't open" cause. After the move to a pipe-based transport, macOS was left a stub with its old WebSocket path deleted. macOS is different: the
steam_osxwrapper enables CEF remote debugging over TCP, so I implemented the macOS path to talk CDP over a libcurl WebSocket (re-resolving the debugger URL each attempt so a steamwebhelper restart doesn't strand it). First clean run: menus open,Connected to SharedJSContext in 25 ms.Shutdown crash
remember the
mutex lock failed: Invalid argumenton shutdown from Feature/macOS support based on async-ffi branch #664? macOS only now runs to a cleanexit(), which exposed one root cause: a static destruction-order issue where teardown locked singletons__cxa_finalizehad already destroyed. Leaking them keeps the sync primitives alive past teardown. Shared code, so it helps every platform.Scripts
scripts/macos/*paths drifted after the layout changes; fixed those too.I also built a macOS CI job + bundle-based install on a branch stacked on this one —
macos-dist. Since it's based on this PR I'm holding off on a second PR, but it's fully green if you want to peek:Github Actions, build-macos passes; the only red job is Windows code-signing, which needs a repo secret my fork doesn't have.Tested Devices
I only have Apple Silicon on hand this round,so it's arm64-only and I couldn't test x86_64. Steam runs arm64 natively onApple Silicon so this is the right slice here.
Thanks for taking a look!