Not sure what you are aiming for. If it is about setting a tree on a rock and getting the tree to grab the rock for a root over rock styling.. you bare root the tree and guide young roots along rhe root surface amd with a foil say clingfilm, you press the roots agains the roch. I have also used radfia. Then you just allow the tree to grow out for a few years. I typically check annually that there still are miltiple roots feeding the tree.
If you want to plant multiple trees on a rock you would first of all find a rock with grooves and hollews ro put the roots. I. The root spaces you can drill small holes. Rhen using pieces of fishing lead: fold a piece of wire and place the folded end into the drilled hole. Place a piece of fishing lead, the aize of the hole, over the wire and hammer it in with a small driver.
Glue can work but is liable to crack in winter over time