Calling Swift Code from C++

Hello, Im trying to call Swift native functions from C++ with cmake and I think your method is the best way to do it. The problem is that I dont fully understand how it works and how to amend the code.
I am not an expert in c++ and what is obvious for some, probably is not for me :frowning:
If someone can help me, giving more details on this code and providing maybe some example that works, that would be of huge help.