This paper examines how the viability approach can be used to define sustainability goals. In an economic model with a non renewable natural resource, we define minimal rights to be guaranteed for all generations. These rights can include a minimal consumption (economic goal) and the preservation of natural resources (environmental goal). From a given economic state, it is possible to define the set of minimal rights that can be provided for all generation. To address the intergenerational equity issue, we propose to use a criterion that define the set of minimal rights that provide the maximal utility, in a Rawlsian perspective (Rawls, 1971). We describe how this criterion can be applied and computed, and discuss it with respect to usual criteria, including the maximin criterion, the Green Golden Rule, the Chichilnisky approach and the Mixed Bentham-Rawls criterion.