Create decentralized p2p network using libp2p and then use it with ray-core(AI distributed task)

Which language need to use to have compatibility libp2p and ray(for example with What is Ray Core? — Ray 2.2.0)?
With other words I want to create my own private p2p decentralized network using libp2p and then
want to use ray-core over this p2p-network to can build AI Task in Master-Worker paradigm.