The function of the cell wall for a eukaryote cell is provide structure, support, and protection for the cell with its rigid outer layer. The cell wall in plants is composed mainly of cellulose and contains three layers in many plants. The three layers are the middle lamella, primary cell wall, and secondary cell wall.