The Chancellor has committed over £10 million in funding to guarantee a library for all primary schools by the end of this parliament.