How do I set rigidbody rotation using angular velocity explicitly?

Knowing the angular velocity, how can I set a rigidbody.rotation to give the correct result?
I want to EXPLICITLY set the rotation, I’m not looking to rotate a rigidbody using rigidbody.angularVelocity. Assuming I have calculated the angular velocity in vector3, how would I use it to achieve the correct rotation over time by manipulating the rigidbody’s orientation explicitly?

I found the answer I was looking for, the problem was building the rotation (incrementing velocity with acceleration) in a euler form and converting it to quaternion. As quaternions can’t work on angles above 180 degrees it leads to unexpected results. The solution is to increment the rotation in quaternion form i.e. transform.rotation = transform.rotation x Quaternion.Euler(angular_velocity_ x Time.deltaTime).
Hope this helps someone in the future!