Vendoring FoundationDB Client

I’m currently working on a Swift application which uses the FoundationDB C API. Currently, it depends on having the FoundationDB client installed on my machine, with pkg-config files placed at known locations. I’m hoping to simplify this a bit, specifically by running Flow on just the client code, and generating a “release” of C and C++ files that only depend on Boost, then vendoring those files into my project. As a stretch goal, I would love to then replace the networking layer with Swift-NIO and thus eliminate the dependency on LibreSSL.

I haven’t worked much with the actual FoundationDB code and it would be great if someone from the community could let me know how large of an undertaking this would be and perhaps point me in the right direction.

I think you’d have to do some custom build system work, as I don’t think there’s a way to get CMake to build your vendor source(?), but theoretically this would be possible to rig up.

I’m not sure that this is a thing you’d want to do though. FDB has a client model that each client library talks to a specific version of FDB, and the FDB client multiplexes over different versions of client libraries to talk to different versions of FDB servers. By vendoring the FDB client source, your application would be pinned to one version of your FDB servers, which means upgrading FDB would lead to downtime.