This is a super fast orbis libs generator, is done in pure SWIFT, and as you can guess being opensource it can be executed everywhere.
More info here: https://swift.org/getting-started/
Is not magic, just take a look to the code, and to the github workflow
You require to have previously downloaded the sprx.json files under the ps4libdoc folder, and finally just run
swift run orbis-parser
All the assembly references will be generated in the lib_s folder.