Roofing felt can get wet and still maintain its integrity as long as it is not exposed to the elements for more than a few days.
Will roofing materials get ruined from the rain.
In fact most are waterproof.
It will break down in sunlight and with large amounts of ongoing.
The actual solid lumber used by many builders for walls floor joists and roof trusses is naturally resistant to rapid decay by water.
Newly installed roofing materials need to be 100 dry in order to seal properly.
Wood rot can and will start when the moisture content of the wood reaches 20 percent.
But wood rot is a slow process where the fungi start to grow and feed on the cellulose in the wood.
The glues used to bond layers of wood in exterior grade plywood and the strands of wood in exterior grade oriented strand board osb are made to resist water.
If it starts to rain or drizzle the roofers should act quickly to cover your osb most likely with a tarp.