Well, when i finished this crossbow i became terrified with the rust problem. The stock, initially covered many times with only linseed oil, quickly became dirty. This is because the rust from metal parts was transported to the wood, as i touched both with my sweaty hands in hot weather ) so i decided to blacken the metal and covered the stock with modern yacht laquer. As for your question, i know only rumors of how they did it in medieval times. One of the best methods, and that is really perfectly working, was applied by my friend on his mail. You just cover metal with thin layer of linseed oil, then "bake" it in the oven for some time (dont remember exactly for how long). Temperature is 200 c if i remember correctly. This thing starts to smell awfully during the process, but when i saw and touched his mail, it seemed like some modern pro blackening.
Another one is soaking in vinegar, that works almost the same as coca cola. But smells like **** ) hope it helped )