OK, so it looks like a good first step would be to externalize the definition of manifolds to an external package, which all those libraries can then depend upon. The bare-bones version (retract/project) used by Optim is https://github.com/JuliaNLSolvers/ManifoldProjections.jl (see also TODO list · Issue #1 · JuliaNLSolvers/ManifoldProjections.jl · GitHub), could we agree on a simple minimal interface that such a library should support (eg discuss it on an issue there)?