  Under a mild technical assumption, we prove a necessary and sufficient
condition for a totally real compacdt set in $\mathbb{C}^n$ to be rationally
convex. This generalizes a classical result of Duval-Sibony
