Mechanisms of shrinkage and the conditions leading to cracking of drying soils are addressed. An elastic formulation of the hydro-mechanical drying problem is presented. It relies on the analogy which can be drawn between the desiccation process and thermo-elasticity. The validity of the analogy is discussed in the light of finite element simulations of air drying experiments on a rectangular soil slab resting on a substrate. Two kinds of tests are dealt with: free desiccation and substrate constrained desiccation tests, with different kinematic boundary conditions. The discussed model is able to reproduce some of the experimental observations.