A straight-edged strip marked with measurements, used for drawing straight lines or measuring length.
From Old French 'riule' meaning 'rule' or 'regulation,' which came from Latin 'regula' meaning 'straight stick' or 'bar.' The measuring stick was called a 'rule' because it enforced the 'regulation' of straight lines and standard measurements. Kings were called rulers because they too enforced regulations - same word, same concept of imposing order.
Your desk ruler and a king who rules a country are called the same thing for the same reason - they both impose order and enforce standards! Medieval craftsmen needed 'rules' (straight sticks) to keep their work orderly, just like kingdoms needed 'rulers' to keep society orderly.
Complete word intelligence in one call. Free tier — 50 lookups/day.