refactor(libs): drop replacements of modules that titles ship themselves #676
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/676"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-05T14:50:47Z.
What
Removes the host replacements of six modules that titles ship themselves, and adds the rule to CONTRIBUTING:
libcohtml,libRenoirCore.PS5(Coherent Gameface/Prysm UI)libREDGalaxy64(GOG Galaxy wrapper)libfmod,libfmodstudio(FMOD)libSceNpCppWebApi(Sony's C++ wrapper overlibSceNpWebApi2), with its two guest tests and its two TechnicalDebt entriesAlso drops the
libcohtml.Prospero.prxcopy rule (core/libs/CMakeLists.txt) and its entry intools/package_release.py.Why:
libcohtml.Prospero.prxandlibRenoirCore.PS5.prxin the application folder (guide), and DOOM + DOOM II ships both (#556). #358 describeslibREDGalaxy64as game-bundled. Titles shiplibfmod.prxandlibfmodstudio.prxwith 1093 and 359 exports; the replacements declared 136 and 97.GuestModuleBuilder::Buildleaves out any host dependency whose name matches a guest module (addHost). So for a title that ships one of these modules, the replacement is never linked.libSceNpCppWebApiis an SDK library, but titles ship it too: Astro's Playroom hassce_module/libSceNpCppWebApi.prx(5.9 MB). Its imports are only system libraries that are already implemented on the host:libSceNpWebApi2(24/24 done),libSceHttp,libSceJson2,libSceRtc,libkernel,libSceLibcInternal. The real work (requests over NpWebApi2) is already on the host; the C++ layer on top runs as converted guest code. Unlikelibc.prx, which titles also ship but which every other library builds on, it is a thin wrapper.Partymodule dropped from #407.main): they declare 565 functions (224 not implemented, 341 counted as done;libSceNpCppWebApialone 230), so the library figure goes from 82.30 % (2758/3351) to 86.76 % (2417/2786).Not in this PR: loading the title's own Cohtml still fails in the relinker with a duplicate guest export between
MediaDecoders.Prospero.prxandlibcohtml.Prospero.prx(#556). That's a separate relinker fix.#600 and #674 also edit the
libcohtml.Prospero.prxline intools/package_release.py; whichever lands second drops it.@boykopovar this adds a CONTRIBUTING rule and removes the module from #358, so it's your call.
@oneandonlydean you test PRs on titles: could you run one that ships Cohtml, FMOD or Galaxy (Minecraft Legends, DOOM + DOOM II, Cyberpunk 2077)? I don't have any of them.
Tested
BUILD_TESTING=ON): reconfigure + full build;ctest350/350.tools/progress.py: 2758/3351 (82.30 %) before, 2417/2786 (86.76 %) after.tools/package_release.py --platform linuxpackages the build with the replacements' outputs removed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T14:51:55Z.
Progress report (
109a328→79057e9)📈 System libraries: 86.76% (+4.46%, -565 removed functions)
🗑️ 565 removed
redGalaxy64GameServerInitredGalaxy64GetErrorStringredGalaxy64InitredGalaxy64ProcessDataredGalaxy64ProcessGameServerDataredGalaxy64Shutdownredgalaxy_stub_00redgalaxy_stub_01redgalaxy_stub_02redgalaxy_stub_03redgalaxy_stub_04redgalaxy_stub_05redgalaxy_stub_06redgalaxy_stub_07redgalaxy_stub_08redgalaxy_stub_09redgalaxy_stub_10redgalaxy_stub_11redgalaxy_stub_12redgalaxy_stub_13redgalaxy_stub_14redgalaxy_stub_15redgalaxy_stub_16redgalaxy_stub_17redgalaxy_stub_18redgalaxy_stub_19redgalaxy_stub_20redgalaxy_stub_21redgalaxy_stub_22renoirStub00renoirStub01renoirStub02renoirStub03renoirStub04renoirStub05renoirStub06renoirStub07renoirStub08renoirStub09renoirStub10renoirStub11renoirStub12renoirStub13renoirStub14renoirStub15renoirStub16renoirStub17renoirStub18renoirStub19renoirStub20renoirStub21renoirStub22_ZN3sce2Np9CppWebApi12Leaderboards2V111UserFactory6createEPNS1_6Common10LibContextEPNS5_12IntrusivePtrINS3_4UserEEE_ZN3sce2Np9CppWebApi12Leaderboards2V121GetRankingRequestBody18setStartSerialRankERKi_ZN3sce2Np9CppWebApi12Leaderboards2V121GetRankingRequestBody8setGroupERKNS3_5GroupE_ZN3sce2Np9CppWebApi12Leaderboards2V121GetRankingRequestBody8setLimitERKi_ZN3sce2Np9CppWebApi12Leaderboards2V121GetRankingRequestBody8setUsersERKNS1_6Common6VectorINS5_12IntrusivePtrINS3_4UserEEEEE_ZN3sce2Np9CppWebApi12Leaderboards2V121GetRankingRequestBody9setOffsetERKi_ZN3sce2Np9CppWebApi12Leaderboards2V122GetRankingResponseBody10getEntriesEv_ZN3sce2Np9CppWebApi12Leaderboards2V122RecordScoreRequestBody10setCommentEPKc_ZN3sce2Np9CppWebApi12Leaderboards2V122RecordScoreRequestBody12setSmallDataEPKvm_ZN3sce2Np9CppWebApi12Leaderboards2V122RecordScoreRequestBody15setNeedsTmpRankERKb_ZN3sce2Np9CppWebApi12Leaderboards2V122RecordScoreRequestBody19setComparedDateTimeERK10SceRtcTick_ZN3sce2Np9CppWebApi12Leaderboards2V122RecordScoreRequestBody7setPcIdERKi_ZN3sce2Np9CppWebApi12Leaderboards2V128GetRankingRequestBodyFactory6createEPNS1_6Common10LibContextEPNS5_12IntrusivePtrINS3_21GetRankingRequestBodyEEE_ZN3sce2Np9CppWebApi12Leaderboards2V129RecordScoreRequestBodyFactory6createEPNS1_6Common10LibContextElPNS5_12IntrusivePtrINS3_22RecordScoreRequestBodyEEE_ZN3sce2Np9CppWebApi12Leaderboards2V14User12setAccountIdERKm_ZN3sce2Np9CppWebApi12Leaderboards2V14User7setPcIdERKi_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi10getRankingEiRKNS4_21ParameterToGetRankingERNS1_6Common11TransactionINS8_12IntrusivePtrINS3_22GetRankingResponseBodyEEENSA_INS8_18ResponseHeaderBaseEEEEE_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi21ParameterToGetRanking10initializeEPNS1_6Common10LibContextEi_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi21ParameterToGetRanking24setgetRankingRequestBodyENS1_6Common12IntrusivePtrINS3_21GetRankingRequestBodyEEE_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi21ParameterToGetRanking9terminateEv_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi21ParameterToGetRankingC1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi21ParameterToGetRankingD1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi22getLargeDataByObjectIdEiRKNS4_33ParameterToGetLargeDataByObjectIdERNS1_6Common21DownStreamTransactionINS8_12IntrusivePtrINS4_37GetLargeDataByObjectIdResponseHeadersEEEEE_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi33ParameterToGetLargeDataByObjectId10initializeEPNS1_6Common10LibContextEPKc_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi33ParameterToGetLargeDataByObjectId9terminateEv_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi33ParameterToGetLargeDataByObjectIdC1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V17ViewApi33ParameterToGetLargeDataByObjectIdD1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V19BoardsApi18getBoardDefinitionEiRKNS4_29ParameterToGetBoardDefinitionERNS1_6Common11TransactionINS8_12IntrusivePtrINS3_30GetBoardDefinitionResponseBodyEEENSA_INS8_18ResponseHeaderBaseEEEEE_ZN3sce2Np9CppWebApi12Leaderboards2V19BoardsApi29ParameterToGetBoardDefinition10initializeEPNS1_6Common10LibContextEi_ZN3sce2Np9CppWebApi12Leaderboards2V19BoardsApi29ParameterToGetBoardDefinition9terminateEv_ZN3sce2Np9CppWebApi12Leaderboards2V19BoardsApi29ParameterToGetBoardDefinitionC1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V19BoardsApi29ParameterToGetBoardDefinitionD1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi11recordScoreEiRKNS4_22ParameterToRecordScoreERNS1_6Common11TransactionINS8_12IntrusivePtrINS3_23RecordScoreResponseBodyEEENSA_INS4_26RecordScoreResponseHeadersEEEEE_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi15recordLargeDataEiRKNS4_26ParameterToRecordLargeDataERNS1_6Common19UpStreamTransactionINS8_12IntrusivePtrINS3_27RecordLargeDataResponseBodyEEENSA_INS8_18ResponseHeaderBaseEEEEE_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi22ParameterToRecordScore10initializeEPNS1_6Common10LibContextEiNS6_12IntrusivePtrINS3_22RecordScoreRequestBodyEEE_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi22ParameterToRecordScore22setxPsnAtomicOperationENS5_19XPsnAtomicOperationE_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi22ParameterToRecordScore9terminateEv_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi22ParameterToRecordScoreC1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi22ParameterToRecordScoreD1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi26ParameterToRecordLargeData10initializeEPNS1_6Common10LibContextEiNS5_19XPsnAtomicOperationEPKc_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi26ParameterToRecordLargeData9terminateEv_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi26ParameterToRecordLargeDataC1Ev_ZN3sce2Np9CppWebApi12Leaderboards2V19RecordApi26ParameterToRecordLargeDataD1Ev_ZN3sce2Np9CppWebApi17TitleCloudStorage2V17DataApi12downloadDataEiRKNS4_23ParameterToDownloadDataERNS1_6Common21DownStreamTransactionINS8_12IntrusivePtrINS4_27DownloadDataResponseHeadersEEEEE_ZN3sce2Np9CppWebApi17TitleCloudStorage2V17DataApi23ParameterToDownloadData10initializeEPNS1_6Common10LibContextEPKci_ZN3sce2Np9CppWebApi17TitleCloudStorage2V17DataApi23ParameterToDownloadData9terminateEv_ZN3sce2Np9CppWebApi17TitleCloudStorage2V17DataApi23ParameterToDownloadDataC1Ev_ZN3sce2Np9CppWebApi17TitleCloudStorage2V17DataApi23ParameterToDownloadDataD1EvImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T15:47:55Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)tools/package_release.pyL13-14tools/package_release.pyL13-14Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T19:45:44Z.
@adriadam10 about testing on a title: PPSA21564 doesn't ship any of these modules (its
sce_modulefolder only haslibc.prxandlibSceNpCppWebApi.prx), and its executable doesn't link any of them, so it can't exercise this change. I don't have Minecraft Legends, DOOM + DOOM II or Cyberpunk 2077 either, so I can't run a title that ships Cohtml, FMOD or Galaxy.From the build side it looks fine: the full ctest passes on Linux with it merged together with the other open relinker and libkernel PRs. One related point: a title that keeps such a module outside
sce_module,sce_modulesandprx(Unity'sMedia/Modules, for example) wasn't converted before #716, so it relied on the host replacement. With #716 the title's own copy is found there too, so landing this after #716 covers that case. The new CONTRIBUTING rule is the maintainer's decision.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-06T05:11:51Z.
@boykopovar I added
libSceNpCppWebApito this PR. I think it matters beyond the progress figure, because people keep putting work into code that a title shipping the module never runs:sce_module/libSceNpCppWebApi.prx, so since #10 the host library is left out ofDT_NEEDEDand never linked.libSceNpWebApi224/24,libSceHttp,libSceJson2,libSceRtc,libkernel,libSceLibcInternal). The real work is in NpWebApi2; the C++ layer runs as converted guest code.Common::Stringbefore it, and #407 and #545 each add another ~560 lines to itsExport.cpp. With 122 exports still marked not implemented, it is the biggest open item on the progress map, so it will keep drawing PRs until the rule says otherwise.Merging this (or deciding against it) settles it for everyone. If you'd rather keep NpCppWebApi out of this PR, I'll take it out again and keep the other five.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T06:18:24Z.
I've thought about this more, and I'm in favour of approving it and removing these,
libSceNpCppWebApiincluded.What I found:
GuestModuleBuilderleaves out any host dependency whose name matches a module the title ships, so for those titles our replacement is never loaded.mainthe head still merges cleanly. It's deletions plus the CONTRIBUTING line, and nothing outside the removed directories references them. The only remaining mention is the0x115entry inlibSceSysmodule/ModuleTable.hpp, which maps the id to a name for the load counter and never loads a host library, so it's harmless.Since this adds a CONTRIBUTING rule, I'll leave the merge to @boykopovar, but it has my support.
Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-06T08:53:17Z.
I thought they were system libraries. I will check today, if they are not system ones, we will delete them.