Move C++ functions to a separate C++ file and wrap it