Emily Hurley I think they are just nailed to the wall. If you look at the lower right corner one, you can see the edge of the last book poking out the right side, so they are not recessed. Really neat look.
Kari Rodrigues The top frame shows that they are recessed to some extent, though not entirely. Looks like small boards were added (probably nailed?) to the top and bottom.