The bare minimum requirement and existing support

Okay, this will be pretty much out of nowhere but…I am very curios.

So, when using a device like the PS Vita to play ROMs and using the built-in PSP emulator, there are a lot of savefiles generated already - and getting them over to my Windows or macOS maschines usually involves manually copying things over before picking up the games I was playing. While RetroArch can manage files quite nicely locally, this is rendered a bit weirdly on the PSVita due to there being two instead of a single, monolithic emulator. And bringing all the saves over is usually a pain in the…back.

So, I was thinking of implementing a kernel module that would basically bring something like a WebDAV or similiar syncing client over to the Vita and possibly other consoles (like a CFW’d PS3 or Switch or…). SyncThing does not exactly require a server sitting in a DC or a PC running day and night to act as one to function - which is great. At least that is what I have understood from this so far. And that is why I was curios if porting a basic SyncThing client to the PSVita would be possible?

What I would need for this is:

  • A possibly existing C/C++ library that implements the SyncThing protocol
  • A set of features required for SyncThing to work

With this, I could write a plugin that would sync individual folders with individual folders on the other node. In my case, I would “link” my uma0:/pspemu/PSP/SAVEDATA folder to .../RetroArch/save/PSP/SAVEDATA on my SyncThing server (or main node) and do something similiar with the rest of the save files. This would be pretty great to have that synced. But this would require individual folder syncing to be possible - or configurable with the library.

So yeah, what’s out there in terms of existing SyncThing implementations in C/C++ and what are their dependencies?

Thanks!

The syncthingtray project links Syncthing with/to a C++ library. That may be useful to look at. Syncthing’s dependency is pretty much just to be running under a regular Linux kernel with a regular filesystem to access.

Note that “libsyncthing” contained by Syncthing Tray is really just wrapping the Go implementation of Syncthing itself within a C++ interface and a CMake build script. It allows you to start and stop Syncthing and to pass a few startup parameter. So it depends on Syncthing itself which you need to be able to build for the platform you’re targeting.

So you really intent to run a custom binary (compiled by you) on the PSVita? If you can cross-compile any Go code for it then you can likely also cross-compile Syncthing for it. My build scripts show how one can (generally) cross compile Syncthing (at least if you know CMake it shouldn’t be hard to read): https://github.com/Martchus/syncthingtray/blob/master/libsyncthing/CMakeLists.txt