Skip to content

Commit

Permalink
[Web] Disable UNIX sockets
Browse files Browse the repository at this point in the history
They are not supported anyway, emscripten has an emulation layer that
implements them over WebSocket/WebRTC, which is really surprising for
users, and also not very useful since we have proper WebSocket and
WebRTC support.

This can make the build smaller, if we also disable the UPNP module
(which will otherwise include a third party library referencing "socket"
thus forcing emscripten to include the compatibility layer)
  • Loading branch information
Faless committed Nov 13, 2024
1 parent fc52821 commit 9383610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/web/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def configure(env: "SConsEnvironment"):
sys.exit(255)

env.Prepend(CPPPATH=["#platform/web"])
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED", "UNIX_SOCKET_UNAVAILABLE"])

if env["opengl3"]:
env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"])
Expand Down

0 comments on commit 9383610

Please sign in to comment.