If they are worried about getting their next meal, she said, “It makes it harder to learn. Giving kids books and nutrition is a win-win, all the way around.”

A couple times a week, Taryn Dowdell, 27, sits in a quiet corner of the Elmwood Place library and reads to her children, Tori, 5, and Tayrnce, 3, while they dig in to their free lunches. Tayrnce scooped a heap of pasta into his mouth and said softly, “It’s yummy.”

Ms. Dowdell said her daughter, who will be starting kindergarten this fall, is typically more picky so doesn’t always want to eat at the library. But today they had little choice. “I didn’t have food at home, so we had to come,” she said.

“Libraries see that kids in their communities are hungry,” said Natalie Cole, a library programs consultant for the California State Library. “We are not only providing meals. We are providing learning opportunities and keeping kids reading all summer long.”

After one lunch, Danielle McFarland, the children’s librarian at Elmwood Place, gave out tiny robots called Ozobots, which are designed for the youngsters to program. Another time, she brought in a 3-D printer so they could see how it worked.

Local sponsors like camps, operators of school feeding programs or churches procure food to be prepared, get it delivered to sites like libraries, and handle most of the administrative tasks and paperwork for reimbursement.